Skip to content

Commit 2942a7f

Browse files
authored
Update api.py (RVC-Boss#979)
修复SynthesizerTrn kwargs 传递异常。
1 parent 813a56c commit 2942a7f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,12 @@ def change_sovits_weights(sovits_path):
174174
hps = dict_s2["config"]
175175
hps = DictToAttrRecursive(hps)
176176
hps.model.semantic_frame_rate = "25hz"
177+
model_params_dict = vars(hps.model)
177178
vq_model = SynthesizerTrn(
178179
hps.data.filter_length // 2 + 1,
179180
hps.train.segment_size // hps.data.hop_length,
180181
n_speakers=hps.data.n_speakers,
181-
**hps.model
182+
**model_params_dict
182183
)
183184
if ("pretrained" not in sovits_path):
184185
del vq_model.enc_q

0 commit comments

Comments
 (0)