shivammehta25 / Matcha-TTS

[ICASSP 2024] 🍵 Matcha-TTS: A fast TTS architecture with conditional flow matching
https://shivammehta25.github.io/Matcha-TTS/
MIT License
747 stars 96 forks source link

Error while training Matcha-TTS model #81

Closed shreyasinghal-17 closed 4 months ago

shreyasinghal-17 commented 4 months ago

I have set Matcha-TTS/configs/model/matcha.yaml out_size=72

I'm getting this error :

File "/anaconda/envs/matcha-tts/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/anaconda/envs/matcha-tts/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, *kwargs) File "/home/azureuser/users/shreya/projects/matcha_ta_epitran/Matcha-TTS/matcha/models/components/decoder.py", line 394, in forward x = resnet(x, mask_down, t) File "/anaconda/envs/matcha-tts/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/anaconda/envs/matcha-tts/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, kwargs) File "/home/azureuser/users/shreya/projects/matcha_ta_epitran/Matcha-TTS/matcha/models/components/decoder.py", line 57, in forward h = self.block1(x, mask) File "/anaconda/envs/matcha-tts/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/anaconda/envs/matcha-tts/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(args, kwargs) File "/home/azureuser/users/shreya/projects/matcha_ta_epitran/Matcha-TTS/matcha/models/components/decoder.py", line 42, in forward output = self.block(x * mask)

RuntimeError: The size of tensor a (72) must match the size of tensor b (62) at non-singleton dimension 2 Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace. [rank: 1] Child process with PID 32984 terminated with code 1. Forcefully terminating all other processes to avoid zombies 🧟 Killed

what can be the reason for this?

shivammehta25 commented 4 months ago

There seems to be a mismatch between the shape of x and the mask provided. Please check the shape of your input and mask. This would require you to debug and see the shapes of your inputs. Also ensure your input is divisible by 4 before going through the UNet. See the usage of this function in the code. https://github.com/shivammehta25/Matcha-TTS/blob/d31cd92a6122fb99987715248941c96744bf0a36/matcha/utils/model.py#L14

shivammehta25 commented 4 months ago

I hope this is resolved. Since this is not a Matcha-TTS issue. I am closing it for now. If you want to continue the discussion I would suggest opening it in the discussions.