From ae3177f29d3bba6079816653965905deb6b37a65 Mon Sep 17 00:00:00 2001 From: ivan provalov Date: Tue, 19 Jul 2022 20:59:43 +0100 Subject: [PATCH 1/4] Fix for Floor Function Warning Fix for Floor Function Warning --- TTS/tts/models/glow_tts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TTS/tts/models/glow_tts.py b/TTS/tts/models/glow_tts.py index 7c0f95e151..0619fd9451 100644 --- a/TTS/tts/models/glow_tts.py +++ b/TTS/tts/models/glow_tts.py @@ -514,7 +514,7 @@ def preprocess(self, y, y_lengths, y_max_length, attn=None): y = y[:, :, :y_max_length] if attn is not None: attn = attn[:, :, :, :y_max_length] - y_lengths = (y_lengths // self.num_squeeze) * self.num_squeeze + y_lengths = torch.div(y_lengths, self.num_squeeze, rounding_mode='floor') * self.num_squeeze return y, y_lengths, y_max_length, attn def store_inverse(self): From ea7e9048201841e9fdd42774071e8cc451e51c0b Mon Sep 17 00:00:00 2001 From: ivan provalov Date: Tue, 19 Jul 2022 21:32:18 +0100 Subject: [PATCH 2/4] Adding double quotes to fix formatting Adding double quotes to fix formatting --- TTS/tts/models/glow_tts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TTS/tts/models/glow_tts.py b/TTS/tts/models/glow_tts.py index 0619fd9451..cc241c43b8 100644 --- a/TTS/tts/models/glow_tts.py +++ b/TTS/tts/models/glow_tts.py @@ -514,7 +514,7 @@ def preprocess(self, y, y_lengths, y_max_length, attn=None): y = y[:, :, :y_max_length] if attn is not None: attn = attn[:, :, :, :y_max_length] - y_lengths = torch.div(y_lengths, self.num_squeeze, rounding_mode='floor') * self.num_squeeze + y_lengths = torch.div(y_lengths, self.num_squeeze, rounding_mode="floor") * self.num_squeeze return y, y_lengths, y_max_length, attn def store_inverse(self): From a67ee958797f044b0214b49174dfe09049a901c1 Mon Sep 17 00:00:00 2001 From: ivan provalov Date: Tue, 19 Jul 2022 22:28:27 +0100 Subject: [PATCH 3/4] Update glow_tts.py --- TTS/tts/models/glow_tts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TTS/tts/models/glow_tts.py b/TTS/tts/models/glow_tts.py index cc241c43b8..e08976a762 100644 --- a/TTS/tts/models/glow_tts.py +++ b/TTS/tts/models/glow_tts.py @@ -514,7 +514,7 @@ def preprocess(self, y, y_lengths, y_max_length, attn=None): y = y[:, :, :y_max_length] if attn is not None: attn = attn[:, :, :, :y_max_length] - y_lengths = torch.div(y_lengths, self.num_squeeze, rounding_mode="floor") * self.num_squeeze + y_lengths = torch.div(y_lengths, self.num_squeeze, rounding_mode="floor") * self.num_squeeze return y, y_lengths, y_max_length, attn def store_inverse(self): From abfd397befba9eb68ec9c945bc15317b5f821e5a Mon Sep 17 00:00:00 2001 From: ivan provalov Date: Tue, 19 Jul 2022 22:37:55 +0100 Subject: [PATCH 4/4] Update glow_tts.py --- TTS/tts/models/glow_tts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TTS/tts/models/glow_tts.py b/TTS/tts/models/glow_tts.py index e08976a762..cc241c43b8 100644 --- a/TTS/tts/models/glow_tts.py +++ b/TTS/tts/models/glow_tts.py @@ -514,7 +514,7 @@ def preprocess(self, y, y_lengths, y_max_length, attn=None): y = y[:, :, :y_max_length] if attn is not None: attn = attn[:, :, :, :y_max_length] - y_lengths = torch.div(y_lengths, self.num_squeeze, rounding_mode="floor") * self.num_squeeze + y_lengths = torch.div(y_lengths, self.num_squeeze, rounding_mode="floor") * self.num_squeeze return y, y_lengths, y_max_length, attn def store_inverse(self):