Spaces:
Running
on
Zero
Running
on
Zero
fix rot
Browse files- app.py +1 -1
- core/models.py +1 -1
app.py
CHANGED
@@ -15,7 +15,7 @@ import gradio as gr
|
|
15 |
|
16 |
# download checkpoints
|
17 |
from huggingface_hub import hf_hub_download
|
18 |
-
ckpt_path = hf_hub_download(repo_id="ashawkey/LGM", filename="
|
19 |
|
20 |
subprocess.run(shlex.split("pip install wheel/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl"))
|
21 |
|
|
|
15 |
|
16 |
# download checkpoints
|
17 |
from huggingface_hub import hf_hub_download
|
18 |
+
ckpt_path = hf_hub_download(repo_id="ashawkey/LGM", filename="model_fp16_fixrot.safetensors")
|
19 |
|
20 |
subprocess.run(shlex.split("pip install wheel/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl"))
|
21 |
|
core/models.py
CHANGED
@@ -40,7 +40,7 @@ class LGM(nn.Module):
|
|
40 |
self.pos_act = lambda x: x.clamp(-1, 1)
|
41 |
self.scale_act = lambda x: 0.1 * F.softplus(x)
|
42 |
self.opacity_act = lambda x: torch.sigmoid(x)
|
43 |
-
self.rot_act = F.normalize
|
44 |
self.rgb_act = lambda x: 0.5 * torch.tanh(x) + 0.5 # NOTE: may use sigmoid if train again
|
45 |
|
46 |
# LPIPS loss
|
|
|
40 |
self.pos_act = lambda x: x.clamp(-1, 1)
|
41 |
self.scale_act = lambda x: 0.1 * F.softplus(x)
|
42 |
self.opacity_act = lambda x: torch.sigmoid(x)
|
43 |
+
self.rot_act = lambda x: F.normalize(x, dim=-1)
|
44 |
self.rgb_act = lambda x: 0.5 * torch.tanh(x) + 0.5 # NOTE: may use sigmoid if train again
|
45 |
|
46 |
# LPIPS loss
|