From 2c0436b9ce397424ae03476c836fb64c6e5ebcc6 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Tue, 10 Jun 2025 14:58:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=9E=E9=AA=8C=E5=90=8D?= =?UTF-8?q?=E7=BB=93=E5=B0=BE=E5=87=BA=E7=8E=B0=E7=A9=BA=E6=A0=BC=E5=9C=A8?= =?UTF-8?q?win=E4=B8=AD=E8=B7=AF=E5=BE=84=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复实验名结尾出现空格在win中路径不正确的问题 --- webui.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webui.py b/webui.py index 26e0fe6..0e34987 100644 --- a/webui.py +++ b/webui.py @@ -507,6 +507,7 @@ def open1Ba( ): global p_train_SoVITS if p_train_SoVITS == None: + exp_name=exp_name.rstrip(" ") config_file = ( "GPT_SoVITS/configs/s2.json" if version not in {"v2Pro", "v2ProPlus"} @@ -603,6 +604,7 @@ def open1Bb( ): global p_train_GPT if p_train_GPT == None: + exp_name=exp_name.rstrip(" ") with open( "GPT_SoVITS/configs/s1longer.yaml" if version == "v1" else "GPT_SoVITS/configs/s1longer-v2.yaml" ) as f: @@ -785,6 +787,7 @@ def open1a(inp_text, inp_wav_dir, exp_name, gpu_numbers, bert_pretrained_dir): inp_wav_dir = my_utils.clean_path(inp_wav_dir) if check_for_existance([inp_text, inp_wav_dir], is_dataset_processing=True): check_details([inp_text, inp_wav_dir], is_dataset_processing=True) + exp_name = exp_name.rstrip(" ") if ps1a == []: opt_dir = "%s/%s" % (exp_root, exp_name) config = { @@ -874,6 +877,7 @@ def open1b(version, inp_text, inp_wav_dir, exp_name, gpu_numbers, ssl_pretrained inp_wav_dir = my_utils.clean_path(inp_wav_dir) if check_for_existance([inp_text, inp_wav_dir], is_dataset_processing=True): check_details([inp_text, inp_wav_dir], is_dataset_processing=True) + exp_name = exp_name.rstrip(" ") if ps1b == []: config = { "inp_text": inp_text, @@ -962,6 +966,7 @@ def open1c(version, inp_text, inp_wav_dir, exp_name, gpu_numbers, pretrained_s2G inp_text = my_utils.clean_path(inp_text) if check_for_existance([inp_text, inp_wav_dir], is_dataset_processing=True): check_details([inp_text, inp_wav_dir], is_dataset_processing=True) + exp_name = exp_name.rstrip(" ") if ps1c == []: opt_dir = "%s/%s" % (exp_root, exp_name) config_file = ( @@ -1059,6 +1064,7 @@ def open1abc( inp_wav_dir = my_utils.clean_path(inp_wav_dir) if check_for_existance([inp_text, inp_wav_dir], is_dataset_processing=True): check_details([inp_text, inp_wav_dir], is_dataset_processing=True) + exp_name = exp_name.rstrip(" ") if ps1abc == []: opt_dir = "%s/%s" % (exp_root, exp_name) try: