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
Kernel size error when rave.decode(z) #15
Comments
ps: reconstruction is working though |
Can you check the size of z before the decoding ? |
when i do z.size() i get |
So your tensor is empty... what does generation_length equals to ? |
generation_length = 2**18 |
Didn't you lower it ? |
with
and in any case i get the following warning
|
Mhhh.. how many dimensions inside the latent space ? I'm guessing the problem comes from the diagonal shift which requires at least 2xlatent_dim time steps to operate ! |
sorry, how do i see the number of dims inside the latent space? choose a name for the training: starling2 |
It's the size of the dummy latent representation |
wiith i'm getting my checkpoints from here, in case this could be relevant rave = RAVE.load_from_checkpoint("/home/syrinx/RAVE/runs/starling1/rave/version_0/checkpoints/best.ckpt", strict=False).eval() |
Ok I see the problem ! The README is quite wrong, I'm about to fix it asap |
awesome. thanks. |
You can, and I've modified the instructions in the readme :) |
ah yes of course - helps to load the model :) |
i get the following error when i try generating from the prior
Traceback (most recent call last): File "/home/syrinx/RAVE/ravezeke1-generate.py", line 43, in <module> y = rave.decode(z) File "/home/syrinx/RAVE/rave/model.py", line 582, in decode y = self.decoder(z, add_noise=True) File "/home/syrinx/miniconda2/envs/rave/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/syrinx/RAVE/rave/model.py", line 235, in forward x = self.net(x) File "/home/syrinx/miniconda2/envs/rave/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/syrinx/miniconda2/envs/rave/lib/python3.9/site-packages/torch/nn/modules/container.py", line 141, in forward input = module(input) File "/home/syrinx/miniconda2/envs/rave/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1120, in _call_impl result = forward_call(*input, **kwargs) File "/home/syrinx/miniconda2/envs/rave/lib/python3.9/site-packages/cached_conv/convs.py", line 74, in forward return nn.functional.conv1d( RuntimeError: Calculated padded input size per channel: (6). Kernel size: (7). Kernel size can't be greater than actual input size
this is the code
`################ PRIOR GENERATION ################
STEP 1: CREATE DUMMY INPUT TENSOR
generation_length = 2**18 # approximately 6s at 48kHz
x = torch.randn(1, 1, generation_length) # dummy input
z = rave.encode(x) # dummy latent representation
z = torch.zeros_like(z)
STEP 2: AUTOREGRESSIVE GENERATION
z = prior.quantized_normal.encode(prior.diagonal_shift(z))
z = prior.generate(z)
z = prior.diagonal_shift.inverse(prior.quantized_normal.decode(z))
STEP 3: SYNTHESIS AND EXPORT
y = rave.decode(z)
sf.write("output_audio.wav", y.reshape(-1).numpy(), sr)
`
when i change generation_length to a smaller size, i get the error
RuntimeError: cannot reshape tensor of 0 elements into shape [1, 0, -1] because the unspecified dimension size -1 can be any value and is ambiguous
my audio is in 44.1kHz
The text was updated successfully, but these errors were encountered: