Commit
·
8a16430
1
Parent(s):
8d03054
debug
Browse files
app.py
CHANGED
@@ -74,7 +74,12 @@ def check_gpu():
|
|
74 |
os.environ['LD_LIBRARY_PATH'] = "/usr/local/cuda-12.1/lib64:" + os.environ.get('LD_LIBRARY_PATH', '')
|
75 |
subprocess.run(['nvidia-smi']) # Test if CUDA is available
|
76 |
print(f"torch.cuda.is_available:{torch.cuda.is_available()}")
|
77 |
-
print("Device count:", torch.cuda.device_count())
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
# Only check GPU in non-UI debug mode
|
80 |
if not UI_ONLY_MODE:
|
@@ -187,7 +192,7 @@ else:
|
|
187 |
import nvdiffrast.torch as dr
|
188 |
dr.RasterizeCudaContext(device="cuda:0")
|
189 |
print("nvdiffrast initialized successfully")
|
190 |
-
|
191 |
print(f"torch.cuda.is_available():{torch.cuda.is_available()}")
|
192 |
# print(f"Before text_to_detailed: {torch.cuda.memory_allocated() / 1024**3} GB")
|
193 |
return k3d_wrapper.get_detailed_prompt(prompt, seed)
|
|
|
74 |
os.environ['LD_LIBRARY_PATH'] = "/usr/local/cuda-12.1/lib64:" + os.environ.get('LD_LIBRARY_PATH', '')
|
75 |
subprocess.run(['nvidia-smi']) # Test if CUDA is available
|
76 |
print(f"torch.cuda.is_available:{torch.cuda.is_available()}")
|
77 |
+
print("Device count:", torch.cuda.device_count())
|
78 |
+
# test nvdiffrast
|
79 |
+
import nvdiffrast.torch as dr
|
80 |
+
dr.RasterizeCudaContext(device="cuda:0")
|
81 |
+
print("nvdiffrast initialized successfully")
|
82 |
+
|
83 |
|
84 |
# Only check GPU in non-UI debug mode
|
85 |
if not UI_ONLY_MODE:
|
|
|
192 |
import nvdiffrast.torch as dr
|
193 |
dr.RasterizeCudaContext(device="cuda:0")
|
194 |
print("nvdiffrast initialized successfully")
|
195 |
+
|
196 |
print(f"torch.cuda.is_available():{torch.cuda.is_available()}")
|
197 |
# print(f"Before text_to_detailed: {torch.cuda.memory_allocated() / 1024**3} GB")
|
198 |
return k3d_wrapper.get_detailed_prompt(prompt, seed)
|