update model versioning for vits weights

This commit is contained in:
Jarod Mica 2025-06-04 14:13:52 -07:00
parent 5ca23e2c70
commit b4c6e3e72a

View File

@ -469,9 +469,13 @@ class TTS:
if self.configs.is_half and str(self.configs.device) != "cpu":
self.bert_model = self.bert_model.half()
def init_vits_weights(self, weights_path: str, vocoder_path: str = None):
def init_vits_weights(self, weights_path: str, vocoder_path: str = None, model_version: str = None):
self.configs.vits_weights_path = weights_path
version, model_version, if_lora_v3 = get_sovits_version_from_path_fast(weights_path)
if model_version:
version, _, if_lora_v3 = get_sovits_version_from_path_fast(weights_path)
else:
version, model_version, if_lora_v3 = get_sovits_version_from_path_fast(weights_path)
path_sovits = self.configs.default_configs[model_version]["vits_weights_path"]
print(if_lora_v3)