Spaces:
Running
Running
kevinwang676
commited on
Update app.py
Browse files
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)
|