Spaces:
Runtime error
Runtime error
Vo Minh Vu
commited on
Commit
·
d661d73
1
Parent(s):
9e6d8d7
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,7 +109,10 @@ infer_config = config.infer_config
|
|
| 109 |
|
| 110 |
IS_FLEXICUBES = True if config_name.startswith('instant-mesh') else False
|
| 111 |
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
# load diffusion model
|
| 115 |
print('Loading diffusion model ...')
|
|
|
|
| 109 |
|
| 110 |
IS_FLEXICUBES = True if config_name.startswith('instant-mesh') else False
|
| 111 |
|
| 112 |
+
# pick GPU if available, else CPU
|
| 113 |
+
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 114 |
+
if device.type == 'cpu':
|
| 115 |
+
print("⚠️ No CUDA GPU detected. Falling back to CPU (this will be very slow!)")
|
| 116 |
|
| 117 |
# load diffusion model
|
| 118 |
print('Loading diffusion model ...')
|