nguyensu27 commited on
Commit
faf39d1
·
verified ·
1 Parent(s): 3a2b24e

Update infer_zipvoice.py

Browse files
Files changed (1) hide show
  1. infer_zipvoice.py +7 -1
infer_zipvoice.py CHANGED
@@ -244,7 +244,13 @@ model_defaults = {
244
 
245
  # device = torch.device("cuda", 0)
246
 
247
- device = torch.device("cpu")
 
 
 
 
 
 
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"