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

Problema con audios de 30 segundos #98

Open
hugozeballos opened this issue Dec 28, 2024 · 1 comment
Open

Problema con audios de 30 segundos #98

hugozeballos opened this issue Dec 28, 2024 · 1 comment

Comments

@hugozeballos
Copy link

Al intentar inferir con el moddelo para audios con una duracion cercana a 30 segundos el modelo se cae, especificamente generando este error:

Traceback (most recent call last):
File "/home/hugoz/storage/seed_vc/seed-vc-main/inference.py", line 278, in
main(args)
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/seed_vc/seed-vc-main/inference.py", line 157, in main
(quantized, codes) = codec_encoder.quantizer(z, waves_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/ialabnas/homes/hugoz/seed_vc/seed-vc-main/modules/quantize.py", line 197, in forward
prosody_feature = self.preprocess(wave_segments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/ialabnas/homes/hugoz/seed_vc/seed-vc-main/modules/quantize.py", line 191, in preprocess
mel_tensor = self.to_mel(wave_tensor.squeeze(1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torchaudio/transforms/_transforms.py", line 619, in forward
specgram = self.spectrogram(waveform)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torchaudio/transforms/_transforms.py", line 110, in forward
return F.spectrogram(
^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torchaudio/functional/functional.py", line 126, in spectrogram
spec_f = torch.stft(
^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torch/functional.py", line 702, in stft
input = F.pad(input.view(extended_shape), [pad, pad], pad_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hugoz/storage/miniconda3/envs/seed-vc-env/lib/python3.11/site-packages/torch/nn/functional.py", line 5096, in pad
return torch._C._nn.pad(input, pad, mode, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Argument #4: Padding size should be less than the corresponding input dimension, but got: padding (1024, 1024) at dimension 2 of input [1, 1, 504]

@Plachtaa
Copy link
Owner

Please describe your issue in English as I don't understand your language.
Also attach input audio samples that caused your problem pls

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