Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files- modules/Device/Device.py +1 -1
modules/Device/Device.py
CHANGED
|
@@ -89,7 +89,7 @@ def get_torch_device() -> torch.device:
|
|
| 89 |
if is_intel_xpu():
|
| 90 |
return torch.device("xpu", torch.xpu.current_device())
|
| 91 |
else:
|
| 92 |
-
if
|
| 93 |
return torch.device(torch.cuda.current_device())
|
| 94 |
else:
|
| 95 |
return torch.device("cpu")
|
|
|
|
| 89 |
if is_intel_xpu():
|
| 90 |
return torch.device("xpu", torch.xpu.current_device())
|
| 91 |
else:
|
| 92 |
+
if torch.cuda.is_available():
|
| 93 |
return torch.device(torch.cuda.current_device())
|
| 94 |
else:
|
| 95 |
return torch.device("cpu")
|