Use non-uniform noise in diffusion_tts6

This commit is contained in:
James Betker 2022-02-08 07:27:41 -07:00
parent f44b064c5e
commit ff35d13b99

View File

@ -381,7 +381,7 @@ class DiffusionTts(nn.Module):
assert lr_input is not None assert lr_input is not None
if self.super_sampling_max_noising_factor > 0: if self.super_sampling_max_noising_factor > 0:
noising_factor = random.uniform(0,self.super_sampling_max_noising_factor) 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') lr_input = F.interpolate(lr_input, size=(x.shape[-1],), mode='nearest')
x = torch.cat([x, lr_input], dim=1) x = torch.cat([x, lr_input], dim=1)