mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-04-05 19:41:56 +08:00
修复根据模型版本识别支持的语种滞后的问题
修复根据模型版本识别支持的语种滞后的问题
This commit is contained in:
parent
87a3b908ee
commit
16941a7c14
@ -223,6 +223,7 @@ def change_sovits_weights(sovits_path,prompt_language=None,text_language=None):
|
||||
version = "v2"
|
||||
model_version="v3"
|
||||
|
||||
dict_language = dict_language_v1 if version =='v1' else dict_language_v2
|
||||
if prompt_language is not None and text_language is not None:
|
||||
if prompt_language in list(dict_language.keys()):
|
||||
prompt_text_update, prompt_language_update = {'__type__':'update'}, {'__type__':'update', 'value':prompt_language}
|
||||
@ -277,7 +278,6 @@ def change_sovits_weights(sovits_path,prompt_language=None,text_language=None):
|
||||
vq_model = vq_model.to(device)
|
||||
vq_model.eval()
|
||||
print("loading sovits_%s"%model_version,vq_model.load_state_dict(dict_s2["weight"], strict=False))
|
||||
dict_language = dict_language_v1 if version =='v1' else dict_language_v2
|
||||
with open("./weight.json")as f:
|
||||
data=f.read()
|
||||
data=json.loads(data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user