ga642381 / FastSpeech2

Multi-Speaker Pytorch FastSpeech2: Fast and High-Quality End-to-End Text to Speech :fist:
92 stars 17 forks source link

Invalid tensor shape #4

Closed Vadim2S closed 2 years ago

Vadim2S commented 3 years ago

VCTK. Model training OK. Run synthesize.py

Additional diagnostic just before crash:

print("Print") print(text) print(src_len) print(spk_ids)

Using cache found in /root/.cache/torch/hub/descriptinc_melgan-neuripsmaster Synthesizing... Weather forecast for tonight: dark |{W EH1 DH ER0 F AO1 R K AE2 S T F AO1 R T AH0 N AY1 T D AA1 R K}| Print tensor([[144, 94, 91, 97, 104, 78, 130, 116, 71, 131, 133, 104, 78, 130, 133, 73, 119, 86, 133, 90, 66, 130, 116], [144, 94, 91, 97, 104, 78, 130, 116, 71, 131, 133, 104, 78, 130, 133, 73, 119, 86, 133, 90, 66, 130, 116], [144, 94, 91, 97, 104, 78, 130, 116, 71, 131, 133, 104, 78, 130, 133, 73, 119, 86, 133, 90, 66, 130, 116]], device='cuda:0') tensor([23, 23, 23], device='cuda:0') tensor([5, 6, 7], device='cuda:0') Traceback (most recent call last): File "synthesize.py", line 168, in synthesize(model, waveglow, melgan, text, sentence, prefix='step{}'.format(args.step)) File "synthesize.py", line 85, in synthesize mel, mel_postnet, log_duration_output, f0_output, energyoutput, , _, mel_len = model(text, src_len, speaker_ids=spk_ids) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/data_parallel.py", line 169, in forward return self.gather(outputs, self.output_device) File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/data_parallel.py", line 181, in gather return gather(outputs, output_device, dim=self.dim) File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/scatter_gather.py", line 78, in gather res = gather_map(outputs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/scatter_gather.py", line 73, in gather_map return type(out)(map(gather_map, zip(outputs))) File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map return Gather.apply(target_device, dim, *outputs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/_functions.py", line 75, in forward return comm.gather(inputs, ctx.dim, ctx.target_device) File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/comm.py", line 235, in gather return torch._C._gather(tensors, dim, destination) RuntimeError: Input tensor at index 1 has invalid shape [1, 293, 80], but expected [1, 371, 80]