kevinwang676 commited on
Commit
3ce52de
·
verified ·
1 Parent(s): e5d3aa9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -456,7 +456,7 @@ def rvc_models(model_name):
456
  if pth_files == []:
457
  print(f"Model [{model_count}/{len(w_dirs)}]: No Model file detected, skipping...")
458
  continue
459
- cpt = torch.load(pth_files[0])
460
  tgt_sr = cpt["config"][-1]
461
  cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
462
  if_f0 = cpt.get("f0", 1)
 
456
  if pth_files == []:
457
  print(f"Model [{model_count}/{len(w_dirs)}]: No Model file detected, skipping...")
458
  continue
459
+ cpt = torch.load(pth_files[0], map_location="cpu")
460
  tgt_sr = cpt["config"][-1]
461
  cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
462
  if_f0 = cpt.get("f0", 1)