mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-08-14 12:39:47 +08:00
fix(config): Fix errors when running inference webui directly
This commit is contained in:
parent
09e9961a0d
commit
448f459856
@ -4,7 +4,7 @@ import os
|
|||||||
import torch,re
|
import torch,re
|
||||||
|
|
||||||
from tools.i18n.i18n import I18nAuto, scan_language_list
|
from tools.i18n.i18n import I18nAuto, scan_language_list
|
||||||
i18n = I18nAuto(language=os.environ["language"])
|
i18n = I18nAuto(language=os.environ.get("language", "Auto"))
|
||||||
|
|
||||||
|
|
||||||
pretrained_sovits_name = {
|
pretrained_sovits_name = {
|
||||||
@ -67,6 +67,7 @@ def get_weights_names():
|
|||||||
for key in name2sovits_path:
|
for key in name2sovits_path:
|
||||||
if os.path.exists(name2sovits_path[key]):SoVITS_names.append(key)
|
if os.path.exists(name2sovits_path[key]):SoVITS_names.append(key)
|
||||||
for path in SoVITS_weight_root:
|
for path in SoVITS_weight_root:
|
||||||
|
if not os.path.exists(path):continue
|
||||||
for name in os.listdir(path):
|
for name in os.listdir(path):
|
||||||
if name.endswith(".pth"):
|
if name.endswith(".pth"):
|
||||||
SoVITS_names.append("%s/%s" % (path, name))
|
SoVITS_names.append("%s/%s" % (path, name))
|
||||||
@ -74,6 +75,7 @@ def get_weights_names():
|
|||||||
for key in name2gpt_path:
|
for key in name2gpt_path:
|
||||||
if os.path.exists(name2gpt_path[key]):GPT_names.append(key)
|
if os.path.exists(name2gpt_path[key]):GPT_names.append(key)
|
||||||
for path in GPT_weight_root:
|
for path in GPT_weight_root:
|
||||||
|
if not os.path.exists(path):continue
|
||||||
for name in os.listdir(path):
|
for name in os.listdir(path):
|
||||||
if name.endswith(".ckpt"):
|
if name.endswith(".ckpt"):
|
||||||
GPT_names.append("%s/%s" % (path, name))
|
GPT_names.append("%s/%s" % (path, name))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user