Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hop size issue #78

Open
Paintako opened this issue Feb 15, 2024 · 1 comment
Open

hop size issue #78

Paintako opened this issue Feb 15, 2024 · 1 comment

Comments

@Paintako
Copy link

Hello,

When I train using a custom dataset, I encounter the following error with the following parameters:

"filter_length": 2048,
"hop_length": 512,
"win_length": 2048,

File "/mnt/Linux_DATA/synthesis/model/vits2_pytorch/train_ms.py", line 441, in train_and_evaluate
loss_mel = F.l1_loss(y_mel, y_hat_mel) * hps.train.c_mel
File "/home/p76111652/.conda/envs/vits/lib/python3.8/site-packages/torch/nn/functional.py", line 3263, in l1_loss
expanded_input, expanded_target = torch.broadcast_tensors(input, target)
File "/home/p76111652/.conda/envs/vits/lib/python3.8/site-packages/torch/functional.py", line 74, in broadcast_tensors
return _VF.broadcast_tensors(tensors) # type: ignore[attr-defined]
RuntimeError: The size of tensor a (16) must match the size of tensor b (8) at non-singleton dimension 2

It seems that the shape of y_mel does not match the shape of y_hat_mel when the hop_size is increased beyond 256.
Any help would be extremely helpful, thanks!

@lexkoro
Copy link
Contributor

lexkoro commented Feb 23, 2024

@Paintako You also need to change the segment_size in config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants