soiz1 commited on
Commit
c3ef8d5
·
verified ·
1 Parent(s): bf22a81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -52,7 +52,7 @@ def model_data(model_name):
52
  if f.endswith(".pth")
53
  ][0]
54
  print(f"Loading {pth_path}")
55
- cpt = torch.load(pth_path, map_location="cpu")
56
  tgt_sr = cpt["config"][-1]
57
  cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
58
  if_f0 = cpt.get("f0", 1)
@@ -100,6 +100,7 @@ def load_hubert():
100
  models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
101
  ["hubert_base.pt"],
102
  suffix="",
 
103
  )
104
  hubert_model = models[0]
105
  hubert_model = hubert_model.to(config.device)
 
52
  if f.endswith(".pth")
53
  ][0]
54
  print(f"Loading {pth_path}")
55
+ cpt = torch.load(pth_path, map_location="cpu", weights_only=False)
56
  tgt_sr = cpt["config"][-1]
57
  cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
58
  if_f0 = cpt.get("f0", 1)
 
100
  models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
101
  ["hubert_base.pt"],
102
  suffix="",
103
+ weights_only=False
104
  )
105
  hubert_model = models[0]
106
  hubert_model = hubert_model.to(config.device)