修复gpt的padding mask的问题 (#2153)
* 修复gpt的padding mask的问题 * rollback tts_config
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user