mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-05-04 09:09:00 +08:00
Merge branch 'fast_inference' of https://github.com/SapphireLab/GPT-SoVITS-M into fast_inference_
This commit is contained in:
commit
38dca77477
@ -100,7 +100,6 @@ class TTS_Config:
|
|||||||
|
|
||||||
return configs
|
return configs
|
||||||
|
|
||||||
|
|
||||||
def save_configs(self, configs_path:str=None)->None:
|
def save_configs(self, configs_path:str=None)->None:
|
||||||
configs={
|
configs={
|
||||||
"default": {
|
"default": {
|
||||||
@ -112,32 +111,31 @@ 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
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": self.update_configs()
|
||||||
"device": str(self.device),
|
|
||||||
"is_half": self.is_half,
|
|
||||||
"t2s_weights_path": self.t2s_weights_path,
|
|
||||||
"vits_weights_path": self.vits_weights_path,
|
|
||||||
"bert_base_path": self.bert_base_path,
|
|
||||||
"cnhuhbert_base_path": self.cnhuhbert_base_path,
|
|
||||||
"flash_attn_enabled": self.flash_attn_enabled
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if configs_path is None:
|
if configs_path is None:
|
||||||
configs_path = self.configs_path
|
configs_path = self.configs_path
|
||||||
with open(configs_path, 'w') as f:
|
with open(configs_path, 'w') as f:
|
||||||
yaml.dump(configs, f)
|
yaml.dump(configs, f)
|
||||||
|
|
||||||
|
def update_configs(self):
|
||||||
|
config = {
|
||||||
|
"device" : str(self.device),
|
||||||
|
"is_half" : self.is_half,
|
||||||
|
"t2s_weights_path" : self.t2s_weights_path,
|
||||||
|
"vits_weights_path" : self.vits_weights_path,
|
||||||
|
"bert_base_path" : self.bert_base_path,
|
||||||
|
"cnhuhbert_base_path": self.cnhuhbert_base_path,
|
||||||
|
"flash_attn_enabled" : self.flash_attn_enabled
|
||||||
|
}
|
||||||
|
return config
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
string = "----------------TTS Config--------------\n"
|
self.configs = self.update_configs()
|
||||||
string += "device: {}\n".format(self.device)
|
string = "TTS Config".center(100, '-') + '\n'
|
||||||
string += "is_half: {}\n".format(self.is_half)
|
for k, v in self.configs.items():
|
||||||
string += "flash_attn_enabled: {}\n".format(self.flash_attn_enabled)
|
string += f"{str(k).ljust(20)}: {str(v)}\n"
|
||||||
string += "bert_base_path: {}\n".format(self.bert_base_path)
|
string += "-" * 100 + '\n'
|
||||||
string += "t2s_weights_path: {}\n".format(self.t2s_weights_path)
|
|
||||||
string += "vits_weights_path: {}\n".format(self.vits_weights_path)
|
|
||||||
string += "cnhuhbert_base_path: {}\n".format(self.cnhuhbert_base_path)
|
|
||||||
string += "----------------------------------------\n"
|
|
||||||
return string
|
return string
|
||||||
|
|
||||||
|
|
||||||
|
@ -158,7 +158,6 @@ class TextPreprocessor:
|
|||||||
bert_feature = torch.cat(bert_feature_list, dim=1)
|
bert_feature = torch.cat(bert_feature_list, dim=1)
|
||||||
# phones = sum(phones_list, [])
|
# phones = sum(phones_list, [])
|
||||||
norm_text = ''.join(norm_text_list)
|
norm_text = ''.join(norm_text_list)
|
||||||
|
|
||||||
return phones_list, bert_feature, norm_text
|
return phones_list, bert_feature, norm_text
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user