From ff35d13b993a7cb7f0180b45d6b75302e1cb3598 Mon Sep 17 00:00:00 2001 From: James Betker Date: Tue, 8 Feb 2022 07:27:41 -0700 Subject: [PATCH] Use non-uniform noise in diffusion_tts6 --- codes/models/gpt_voice/unet_diffusion_tts6.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/models/gpt_voice/unet_diffusion_tts6.py b/codes/models/gpt_voice/unet_diffusion_tts6.py index 2ad52943..d518fbc3 100644 --- a/codes/models/gpt_voice/unet_diffusion_tts6.py +++ b/codes/models/gpt_voice/unet_diffusion_tts6.py @@ -381,7 +381,7 @@ class DiffusionTts(nn.Module): assert lr_input is not None if self.super_sampling_max_noising_factor > 0: noising_factor = random.uniform(0,self.super_sampling_max_noising_factor) - lr_input = torch.rand_like(lr_input) * noising_factor + lr_input + lr_input = torch.randn_like(lr_input) * noising_factor + lr_input lr_input = F.interpolate(lr_input, size=(x.shape[-1],), mode='nearest') x = torch.cat([x, lr_input], dim=1)