From b6b14a76aff6c5eb87acd7b91b1075f4c5809077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Mon, 8 Nov 2021 09:20:11 +0100 Subject: [PATCH] Fix VITS stochastic duration predictor --- TTS/tts/layers/vits/stochastic_duration_predictor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TTS/tts/layers/vits/stochastic_duration_predictor.py b/TTS/tts/layers/vits/stochastic_duration_predictor.py index 53f7ca7c..91e53da3 100644 --- a/TTS/tts/layers/vits/stochastic_duration_predictor.py +++ b/TTS/tts/layers/vits/stochastic_duration_predictor.py @@ -266,7 +266,7 @@ class StochasticDurationPredictor(nn.Module): flows = list(reversed(self.flows)) flows = flows[:-2] + [flows[-1]] # remove a useless vflow - z = torch.rand(x.size(0), 2, x.size(2)).to(device=x.device, dtype=x.dtype) * noise_scale + z = torch.randn(x.size(0), 2, x.size(2)).to(device=x.device, dtype=x.dtype) * noise_scale for flow in flows: z = torch.flip(z, [1]) z = flow(z, x_mask, g=x, reverse=reverse)