kevinwang676 commited on
Commit
078ed35
·
verified ·
1 Parent(s): 9ea55a5

Update GPT_SoVITS/app.py

Browse files
Files changed (1) hide show
  1. GPT_SoVITS/app.py +2 -2
GPT_SoVITS/app.py CHANGED
@@ -141,7 +141,7 @@ else:
141
 
142
  def change_sovits_weights(sovits_path):
143
  global vq_model, hps
144
- dict_s2 = torch.load(sovits_path)
145
  hps = dict_s2["config"]
146
  hps = DictToAttrRecursive(hps)
147
  hps.model.semantic_frame_rate = "25hz"
@@ -169,7 +169,7 @@ change_sovits_weights(sovits_path)
169
  def change_gpt_weights(gpt_path):
170
  global hz, max_sec, t2s_model, config
171
  hz = 50
172
- dict_s1 = torch.load(gpt_path)
173
  config = dict_s1["config"]
174
  max_sec = config["data"]["max_sec"]
175
  t2s_model = Text2SemanticLightningModule(config, "****", is_train=False)
 
141
 
142
  def change_sovits_weights(sovits_path):
143
  global vq_model, hps
144
+ dict_s2 = torch.load(sovits_path, map_location="cpu")
145
  hps = dict_s2["config"]
146
  hps = DictToAttrRecursive(hps)
147
  hps.model.semantic_frame_rate = "25hz"
 
169
  def change_gpt_weights(gpt_path):
170
  global hz, max_sec, t2s_model, config
171
  hz = 50
172
+ dict_s1 = torch.load(gpt_path, map_location="cpu")
173
  config = dict_s1["config"]
174
  max_sec = config["data"]["max_sec"]
175
  t2s_model = Text2SemanticLightningModule(config, "****", is_train=False)