From 16941a7c1433e8366867174fda3b844f07006557 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Thu, 13 Feb 2025 23:17:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=B9=E6=8D=AE=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E7=89=88=E6=9C=AC=E8=AF=86=E5=88=AB=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=9A=84=E8=AF=AD=E7=A7=8D=E6=BB=9E=E5=90=8E=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复根据模型版本识别支持的语种滞后的问题 --- GPT_SoVITS/inference_webui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPT_SoVITS/inference_webui.py b/GPT_SoVITS/inference_webui.py index ccb4099..10ebb97 100644 --- a/GPT_SoVITS/inference_webui.py +++ b/GPT_SoVITS/inference_webui.py @@ -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)