mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-04-05 04:22:46 +08:00
support gpt-sovits v2
support gpt-sovits v2
This commit is contained in:
parent
4c8b761220
commit
ff6c193f6f
2
go-webui-v2.bat
Normal file
2
go-webui-v2.bat
Normal file
@ -0,0 +1,2 @@
|
||||
runtime\python.exe webui.py v2
|
||||
pause
|
4
go-webui-v2.ps1
Normal file
4
go-webui-v2.ps1
Normal file
@ -0,0 +1,4 @@
|
||||
$ErrorActionPreference = "SilentlyContinue"
|
||||
chcp 65001
|
||||
& "$PSScriptRoot\runtime\python.exe" "$PSScriptRoot\webui.py v2"
|
||||
pause
|
14
webui.py
14
webui.py
@ -1,4 +1,6 @@
|
||||
import os,shutil,sys,pdb,re
|
||||
version="v2"if sys.argv[-1]=="v2" else"v1"
|
||||
os.environ["version"]=version
|
||||
now_dir = os.getcwd()
|
||||
sys.path.insert(0, now_dir)
|
||||
import json,yaml,warnings,torch
|
||||
@ -104,8 +106,8 @@ def fix_gpu_numbers(inputs):
|
||||
return ",".join(output)
|
||||
except:
|
||||
return inputs
|
||||
pretrained_sovits_name="GPT_SoVITS/pretrained_models/s2G488k.pth"
|
||||
pretrained_gpt_name="GPT_SoVITS/pretrained_models/s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt"
|
||||
pretrained_sovits_name="GPT_SoVITS/pretrained_models/s2G488k.pth"if version=="v1"else"GPT_SoVITS/pretrained_models/gsv-v2final-pretrained/s2G2333k.pth"
|
||||
pretrained_gpt_name="GPT_SoVITS/pretrained_models/s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt"if version=="v1"else "GPT_SoVITS/pretrained_models/gsv-v2final-pretrained/s1bert25hz-5kh-longer-epoch=12-step=369668.ckpt"
|
||||
def get_weights_names():
|
||||
SoVITS_names = [pretrained_sovits_name]
|
||||
for name in os.listdir(SoVITS_weight_root):
|
||||
@ -313,7 +315,7 @@ p_train_GPT=None
|
||||
def open1Bb(batch_size,total_epoch,exp_name,if_dpo,if_save_latest,if_save_every_weights,save_every_epoch,gpu_numbers,pretrained_s1):
|
||||
global p_train_GPT
|
||||
if(p_train_GPT==None):
|
||||
with open("GPT_SoVITS/configs/s1longer.yaml")as f:
|
||||
with open("GPT_SoVITS/configs/s1longer.yaml"if version=="v1"else "GPT_SoVITS/configs/s1longer-v2.yaml")as f:
|
||||
data=f.read()
|
||||
data=yaml.load(data, Loader=yaml.FullLoader)
|
||||
s1_dir="%s/%s"%(exp_root,exp_name)
|
||||
@ -827,9 +829,9 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app:
|
||||
with gr.Row():
|
||||
exp_name = gr.Textbox(label=i18n("*实验/模型名"), value="xxx", interactive=True)
|
||||
gpu_info = gr.Textbox(label=i18n("显卡信息"), value=gpu_info, visible=True, interactive=False)
|
||||
pretrained_s2G = gr.Textbox(label=i18n("预训练的SoVITS-G模型路径"), value="GPT_SoVITS/pretrained_models/s2G488k.pth", interactive=True)
|
||||
pretrained_s2D = gr.Textbox(label=i18n("预训练的SoVITS-D模型路径"), value="GPT_SoVITS/pretrained_models/s2D488k.pth", interactive=True)
|
||||
pretrained_s1 = gr.Textbox(label=i18n("预训练的GPT模型路径"), value="GPT_SoVITS/pretrained_models/s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt", interactive=True)
|
||||
pretrained_s2G = gr.Textbox(label=i18n("预训练的SoVITS-G模型路径"), value=pretrained_sovits_name, interactive=True)
|
||||
pretrained_s2D = gr.Textbox(label=i18n("预训练的SoVITS-D模型路径"), value=pretrained_sovits_name.replace("s2G","s2D"), interactive=True)
|
||||
pretrained_s1 = gr.Textbox(label=i18n("预训练的GPT模型路径"), value=pretrained_gpt_name, interactive=True)
|
||||
with gr.TabItem(i18n("1A-训练集格式化工具")):
|
||||
gr.Markdown(value=i18n("输出logs/实验名目录下应有23456开头的文件和文件夹"))
|
||||
with gr.Row():
|
||||
|
Loading…
x
Reference in New Issue
Block a user