Spaces:
Sleeping
Sleeping
dmitriitochilkin
commited on
Commit
•
db20d3e
1
Parent(s):
23e4ec1
limit chunk size
Browse files- app.py +1 -0
- tsr/system.py +1 -1
app.py
CHANGED
@@ -25,6 +25,7 @@ model = TSR.from_pretrained(
|
|
25 |
weight_name="model.ckpt",
|
26 |
token=HF_TOKEN
|
27 |
)
|
|
|
28 |
model.to(device)
|
29 |
|
30 |
rembg_session = rembg.new_session()
|
|
|
25 |
weight_name="model.ckpt",
|
26 |
token=HF_TOKEN
|
27 |
)
|
28 |
+
model.renderer.set_chunk_size(131072)
|
29 |
model.to(device)
|
30 |
|
31 |
rembg_session = rembg.new_session()
|
tsr/system.py
CHANGED
@@ -168,7 +168,7 @@ class TSR(BaseModule):
|
|
168 |
return
|
169 |
self.isosurface_helper = MarchingCubeHelper(resolution)
|
170 |
|
171 |
-
def extract_mesh(self, scene_codes, resolution: int = 256, threshold: float =
|
172 |
self.set_marching_cubes_resolution(resolution)
|
173 |
meshes = []
|
174 |
for scene_code in scene_codes:
|
|
|
168 |
return
|
169 |
self.isosurface_helper = MarchingCubeHelper(resolution)
|
170 |
|
171 |
+
def extract_mesh(self, scene_codes, resolution: int = 256, threshold: float = 25.0):
|
172 |
self.set_marching_cubes_resolution(resolution)
|
173 |
meshes = []
|
174 |
for scene_code in scene_codes:
|