This commit is contained in:
XXXXRT666 2024-08-03 20:54:59 +08:00
parent a624572437
commit 838965b6c2
2 changed files with 4 additions and 4 deletions

View File

@ -595,8 +595,8 @@ def change_choices():
return {"choices": sorted(SoVITS_names, key=custom_sort_key), "__type__": "update"}, {"choices": sorted(GPT_names, key=custom_sort_key), "__type__": "update"}
SoVITS_weight_root = f"SoVITS_weights/{version}"
GPT_weight_root = f"GPT_weights/{version}"
SoVITS_weight_root="SoVITS_weights_v2" if version=='v2' else "SoVITS_weights"
GPT_weight_root="GPT_weights_v2" if version=='v2' else "GPT_weights"
os.makedirs(SoVITS_weight_root, exist_ok=True)
os.makedirs(GPT_weight_root, exist_ok=True)

View File

@ -122,8 +122,8 @@ def get_weights_names():
for name in os.listdir(GPT_weight_root):
if name.endswith(".ckpt"): GPT_names.append(name)
return SoVITS_names,GPT_names
SoVITS_weight_root=f"SoVITS_weights/{version}"
GPT_weight_root=f"GPT_weights/{version}"
SoVITS_weight_root="SoVITS_weights_v2" if version=='v2' else "SoVITS_weights"
GPT_weight_root="GPT_weights_v2" if version=='v2' else "GPT_weights"
os.makedirs(SoVITS_weight_root,exist_ok=True)
os.makedirs(GPT_weight_root,exist_ok=True)
SoVITS_names,GPT_names = get_weights_names()