Spaces:
Sleeping
Sleeping
staswrs
commited on
Commit
·
5f887dc
1
Parent(s):
f2228f5
clean scene 4
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ import requests
|
|
22 |
import traceback
|
23 |
import trimesh
|
24 |
print("Trimesh version:", trimesh.__version__)
|
25 |
-
|
26 |
|
27 |
from inference_triposg import run_triposg
|
28 |
from triposg.pipelines.pipeline_triposg import TripoSGPipeline
|
@@ -121,11 +121,11 @@ def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25):
|
|
121 |
raise ValueError("Mesh generation returned None")
|
122 |
|
123 |
# Очистка визуала, метаданных и имени
|
124 |
-
mesh.visual =
|
125 |
mesh.metadata.clear()
|
126 |
mesh.name = "geometry_0"
|
127 |
|
128 |
-
glb_data =
|
129 |
with open(output_path, "wb") as f:
|
130 |
f.write(glb_data)
|
131 |
|
|
|
22 |
import traceback
|
23 |
import trimesh
|
24 |
print("Trimesh version:", trimesh.__version__)
|
25 |
+
|
26 |
|
27 |
from inference_triposg import run_triposg
|
28 |
from triposg.pipelines.pipeline_triposg import TripoSGPipeline
|
|
|
121 |
raise ValueError("Mesh generation returned None")
|
122 |
|
123 |
# Очистка визуала, метаданных и имени
|
124 |
+
mesh.visual = None
|
125 |
mesh.metadata.clear()
|
126 |
mesh.name = "geometry_0"
|
127 |
|
128 |
+
glb_data = mesh.export(file_type="glb", include_scene=False)
|
129 |
with open(output_path, "wb") as f:
|
130 |
f.write(glb_data)
|
131 |
|