Commit
·
a8fbf4a
1
Parent(s):
1ca3adb
fix
Browse files- tts/frontend_function.py +1 -1
tts/frontend_function.py
CHANGED
@@ -58,7 +58,7 @@ def align(self, wav):
|
|
58 |
mel = torch.FloatTensor(mel_spec.T).to(self.device)[None].transpose(1,2)
|
59 |
|
60 |
# Validate tensor before further processing
|
61 |
-
if torch.
|
62 |
raise ValueError("Mel tensor contains NaN or infinite values")
|
63 |
prompt_max_frame = mel.size(2) // self.fm * self.fm
|
64 |
mel = mel[:, :, :prompt_max_frame]
|
|
|
58 |
mel = torch.FloatTensor(mel_spec.T).to(self.device)[None].transpose(1,2)
|
59 |
|
60 |
# Validate tensor before further processing
|
61 |
+
if torch.isnan(mel).any() or torch.isinf(mel).any():
|
62 |
raise ValueError("Mel tensor contains NaN or infinite values")
|
63 |
prompt_max_frame = mel.size(2) // self.fm * self.fm
|
64 |
mel = mel[:, :, :prompt_max_frame]
|