Commit
Β·
ed53610
1
Parent(s):
9cc3979
debug
Browse files
app.py
CHANGED
|
@@ -170,7 +170,7 @@ def save_py3dmesh_with_trimesh_fast(meshes, save_glb_path=TEMP_MESH_ADDRESS, app
|
|
| 170 |
fix_vert_color_glb(save_glb_path)
|
| 171 |
print(f"saving to {save_glb_path}")
|
| 172 |
|
| 173 |
-
@spaces.GPU
|
| 174 |
def text_to_detailed(prompt, seed=None):
|
| 175 |
# test nvdiffrast
|
| 176 |
subprocess.run(
|
|
@@ -187,7 +187,6 @@ def text_to_detailed(prompt, seed=None):
|
|
| 187 |
subprocess.run(['nvidia-smi']) # Test if CUDA is available
|
| 188 |
print(f"torch.cuda.is_available:{torch.cuda.is_available()}")
|
| 189 |
print("Device count:", torch.cuda.device_count())
|
| 190 |
-
subprocess.run(['nvidia-smi'])
|
| 191 |
import nvdiffrast.torch as dr
|
| 192 |
dr.RasterizeCudaContext()
|
| 193 |
print("nvdiffrast initialized successfully")
|
|
|
|
| 170 |
fix_vert_color_glb(save_glb_path)
|
| 171 |
print(f"saving to {save_glb_path}")
|
| 172 |
|
| 173 |
+
@spaces.GPU(duration=120)
|
| 174 |
def text_to_detailed(prompt, seed=None):
|
| 175 |
# test nvdiffrast
|
| 176 |
subprocess.run(
|
|
|
|
| 187 |
subprocess.run(['nvidia-smi']) # Test if CUDA is available
|
| 188 |
print(f"torch.cuda.is_available:{torch.cuda.is_available()}")
|
| 189 |
print("Device count:", torch.cuda.device_count())
|
|
|
|
| 190 |
import nvdiffrast.torch as dr
|
| 191 |
dr.RasterizeCudaContext()
|
| 192 |
print("nvdiffrast initialized successfully")
|