diff --git a/GPT_SoVITS/TTS_infer_pack/TTS.py b/GPT_SoVITS/TTS_infer_pack/TTS.py index 6d67f8ae..0c1d2484 100644 --- a/GPT_SoVITS/TTS_infer_pack/TTS.py +++ b/GPT_SoVITS/TTS_infer_pack/TTS.py @@ -318,7 +318,7 @@ class TTS_Config: if str(self.device) == "cpu" and self.is_half: print(f"Warning: Half precision is not supported on CPU, set is_half to False.") self.is_half = False - + version = self.configs.get("version", None) self.version = version assert self.version in ["v1", "v2", "v3", "v4", "v2Pro", "v2ProPlus"], "Invalid version!" @@ -578,6 +578,10 @@ class TTS: if self.configs.is_half and str(self.configs.device) != "cpu": self.vits_model = self.vits_model.half() + self.configs.save_configs() + + + def init_t2s_weights(self, weights_path: str): print(f"Loading Text2Semantic weights from {weights_path}") self.configs.t2s_weights_path = weights_path