Spaces:
Running
Running
Update infer_zipvoice.py
Browse files- infer_zipvoice.py +7 -1
infer_zipvoice.py
CHANGED
|
@@ -244,7 +244,13 @@ model_defaults = {
|
|
| 244 |
|
| 245 |
# device = torch.device("cuda", 0)
|
| 246 |
|
| 247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
|
| 249 |
print("Loading model...")
|
| 250 |
model_config = "config.json"
|
|
|
|
| 244 |
|
| 245 |
# device = torch.device("cuda", 0)
|
| 246 |
|
| 247 |
+
if torch.cuda.is_available():
|
| 248 |
+
device = torch.device("cuda")
|
| 249 |
+
print("Using GPU")
|
| 250 |
+
else:
|
| 251 |
+
device = torch.device("cpu")
|
| 252 |
+
print("Using CPU")
|
| 253 |
+
|
| 254 |
|
| 255 |
print("Loading model...")
|
| 256 |
model_config = "config.json"
|