修复gpt的padding mask的问题 (#2153)

* 修复gpt的padding mask的问题

* rollback tts_config
This commit is contained in:
ChasonJiang
2025-03-05 17:14:43 +08:00
committed by GitHub
parent fe2f04bdb8
commit 053a356ffe
3 changed files with 42 additions and 11 deletions

View File

@@ -145,11 +145,15 @@ class TTS_Config:
self.device = self.configs.get("device", torch.device("cpu"))
if str(self.device) == "cpu":
print(f"Warning: Half precision is not supported on CPU, set is_half to False.")
self.is_half = False
else:
self.is_half = self.configs.get("is_half", False)
if "cuda" in str(self.device) and not torch.cuda.is_available():
print(f"Warning: CUDA is not available, set device to CPU.")
self.device = torch.device("cpu")
# self.is_half = self.configs.get("is_half", False)
# 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
self.version = version
self.t2s_weights_path = self.configs.get("t2s_weights_path", None)
self.vits_weights_path = self.configs.get("vits_weights_path", None)