Spaces:
Runtime error
Runtime error
Commit
·
080fb1b
1
Parent(s):
231591c
Change to GPU
Browse files
3D_Stage/lrm/models/exporters/__pycache__/mesh_exporter.cpython-310.pyc
CHANGED
Binary files a/3D_Stage/lrm/models/exporters/__pycache__/mesh_exporter.cpython-310.pyc and b/3D_Stage/lrm/models/exporters/__pycache__/mesh_exporter.cpython-310.pyc differ
|
|
3D_Stage/lrm/models/exporters/mesh_exporter.py
CHANGED
@@ -78,7 +78,8 @@ class MeshExporter(Exporter):
|
|
78 |
|
79 |
def configure(self, renderer: BaseRenderer) -> None:
|
80 |
super().configure(renderer)
|
81 |
-
self.ctx =
|
|
|
82 |
if self.cfg.fmt == "obj-mtl":
|
83 |
lrm.warn(
|
84 |
f"fmt=obj-mtl is deprecated, please us fmt=obj and visual=uv instead."
|
@@ -101,7 +102,7 @@ class MeshExporter(Exporter):
|
|
101 |
def get_texture_maps(
|
102 |
self, scene_code: torch.Tensor, mesh: Mesh
|
103 |
) -> Dict[str, torch.Tensor]:
|
104 |
-
|
105 |
assert mesh.has_uv
|
106 |
# clip space transform
|
107 |
uv_clip = mesh.v_tex * 2.0 - 1.0
|
|
|
78 |
|
79 |
def configure(self, renderer: BaseRenderer) -> None:
|
80 |
super().configure(renderer)
|
81 |
+
self.ctx = None
|
82 |
+
#self.ctx = NVDiffRasterizerContext(self.cfg.context_type, self.device)
|
83 |
if self.cfg.fmt == "obj-mtl":
|
84 |
lrm.warn(
|
85 |
f"fmt=obj-mtl is deprecated, please us fmt=obj and visual=uv instead."
|
|
|
102 |
def get_texture_maps(
|
103 |
self, scene_code: torch.Tensor, mesh: Mesh
|
104 |
) -> Dict[str, torch.Tensor]:
|
105 |
+
self.ctx = NVDiffRasterizerContext(self.cfg.context_type, self.device)
|
106 |
assert mesh.has_uv
|
107 |
# clip space transform
|
108 |
uv_clip = mesh.v_tex * 2.0 - 1.0
|
3D_Stage/lrm/models/renderers/__pycache__/triplane_dmtet.cpython-310.pyc
CHANGED
Binary files a/3D_Stage/lrm/models/renderers/__pycache__/triplane_dmtet.cpython-310.pyc and b/3D_Stage/lrm/models/renderers/__pycache__/triplane_dmtet.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -320,7 +320,7 @@ class Inference3D_API:
|
|
320 |
|
321 |
@spaces.GPU(duration=120)
|
322 |
def process_images(self, img_input0, img_input1, img_input2, img_input3, back_proj, smooth_iter):
|
323 |
-
|
324 |
meta = json.load(open("./3D_Stage/material/meta.json"))
|
325 |
c2w_cond = [np.array(loc["transform_matrix"]) for loc in meta["locations"]]
|
326 |
c2w_cond = torch.from_numpy(np.stack(c2w_cond, axis=0)).float()[None].to(self.device)
|
|
|
320 |
|
321 |
@spaces.GPU(duration=120)
|
322 |
def process_images(self, img_input0, img_input1, img_input2, img_input3, back_proj, smooth_iter):
|
323 |
+
self.system = self.system.to("cuda")
|
324 |
meta = json.load(open("./3D_Stage/material/meta.json"))
|
325 |
c2w_cond = [np.array(loc["transform_matrix"]) for loc in meta["locations"]]
|
326 |
c2w_cond = torch.from_numpy(np.stack(c2w_cond, axis=0)).float()[None].to(self.device)
|
input.png
CHANGED
![]() |
![]() |
input_3D.png
CHANGED
![]() |
![]() |