mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-09 00:10:00 +08:00
修正删除模型会报错的bug
This commit is contained in:
parent
fdc2df2170
commit
8eb3c556f9
@ -51,6 +51,10 @@ custom:
|
|||||||
|
|
||||||
class TTS_Config:
|
class TTS_Config:
|
||||||
def __init__(self, configs: Union[dict, str]):
|
def __init__(self, configs: Union[dict, str]):
|
||||||
|
if isinstance(configs, str) and configs=="":
|
||||||
|
self.default_configs:dict = None
|
||||||
|
self.configs_path = "GPT_SoVITS/configs/tts_infer.yaml"
|
||||||
|
else:
|
||||||
configs_base_path:str = "GPT_SoVITS/configs/"
|
configs_base_path:str = "GPT_SoVITS/configs/"
|
||||||
os.makedirs(configs_base_path, exist_ok=True)
|
os.makedirs(configs_base_path, exist_ok=True)
|
||||||
self.configs_path:str = os.path.join(configs_base_path, "tts_infer.yaml")
|
self.configs_path:str = os.path.join(configs_base_path, "tts_infer.yaml")
|
||||||
@ -70,7 +74,10 @@ class TTS_Config:
|
|||||||
"bert_base_path": "GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large",
|
"bert_base_path": "GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large",
|
||||||
"flash_attn_enabled": True
|
"flash_attn_enabled": True
|
||||||
}
|
}
|
||||||
|
if isinstance(configs, dict):
|
||||||
self.configs:dict = configs.get("custom", self.default_configs)
|
self.configs:dict = configs.get("custom", self.default_configs)
|
||||||
|
else:
|
||||||
|
self.configs:dict = self.default_configs
|
||||||
|
|
||||||
self.device = self.configs.get("device")
|
self.device = self.configs.get("device")
|
||||||
self.is_half = self.configs.get("is_half")
|
self.is_half = self.configs.get("is_half")
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 6db34d726ae2d84ab7982865343bf966246e00d4
|
Subproject commit 03326be908f0288ab8d26f435eca2ca1ec950b90
|
@ -1,4 +1,8 @@
|
|||||||
{
|
{
|
||||||
"deflaut_character": "胡桃(测试)"
|
"deflaut_character": "胡桃(测试)",
|
||||||
|
"characters_and_emotions": {
|
||||||
|
"胡桃(测试)": [
|
||||||
|
"default"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user