Commit Β·
5be3795
1
Parent(s): f4015c9
debug
Browse files
app.py
CHANGED
|
@@ -172,16 +172,16 @@ def save_py3dmesh_with_trimesh_fast(meshes, save_glb_path=TEMP_MESH_ADDRESS, app
|
|
| 172 |
@spaces.GPU
|
| 173 |
def text_to_detailed(prompt, seed=None):
|
| 174 |
# test nvdiffrast
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
if "CUDA_VISIBLE_DEVICES" in os.environ:
|
| 181 |
del os.environ["CUDA_VISIBLE_DEVICES"]
|
| 182 |
subprocess.run(['nvidia-smi'])
|
| 183 |
import nvdiffrast.torch as dr
|
| 184 |
-
dr.RasterizeCudaContext(
|
| 185 |
print("nvdiffrast initialized successfully")
|
| 186 |
|
| 187 |
print(f"torch.cuda.is_available():{torch.cuda.is_available()}")
|
|
|
|
| 172 |
@spaces.GPU
|
| 173 |
def text_to_detailed(prompt, seed=None):
|
| 174 |
# test nvdiffrast
|
| 175 |
+
subprocess.run(
|
| 176 |
+
shlex.split(
|
| 177 |
+
"rm -rf /home/user/.cache/torch_extensions/py310_cu121/nvdiffrast_plugin/lock"
|
| 178 |
+
)
|
| 179 |
+
)
|
| 180 |
if "CUDA_VISIBLE_DEVICES" in os.environ:
|
| 181 |
del os.environ["CUDA_VISIBLE_DEVICES"]
|
| 182 |
subprocess.run(['nvidia-smi'])
|
| 183 |
import nvdiffrast.torch as dr
|
| 184 |
+
dr.RasterizeCudaContext()
|
| 185 |
print("nvdiffrast initialized successfully")
|
| 186 |
|
| 187 |
print(f"torch.cuda.is_available():{torch.cuda.is_available()}")
|