Make easier to train on max sample length = 10s

This commit is contained in:
ZDisket
2023-05-26 16:49:23 -03:00
parent 2a263444a1
commit ca694d0190
4 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -394,7 +394,9 @@ def evaluate(hps, generator, eval_loader, writer_eval):
t_bert_lens = torch.LongTensor([t_bert.size(1)]).cuda(0)
t_bert = t_bert.cuda(0)
audio, attn, t_mask, _ = generator.module.infer(t_text_norm, t_text_lengths, t_moji, t_bert, t_bert_lens, noise_scale=.667, noise_scale_w=0.8, length_scale=1.0)
with torch.no_grad():
audio, attn, t_mask, _ = generator.module.infer(t_text_norm, t_text_lengths, t_moji, t_bert, t_bert_lens, noise_scale=.667, noise_scale_w=0.8, length_scale=1.0)
test_audio_lengths = t_mask.sum([1,2]).long() * hps.data.hop_length
y_test_mel = mel_spectrogram_torch(
audio.squeeze(1).float(),