-
Notifications
You must be signed in to change notification settings - Fork 182
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
export error v2.3.1 #275
Comments
Having this same error when exporting on v2.3 |
Yeah, I'm seeing issues exporting any models w/ two channels. Single channel seems to work fine. |
In mycase it looks like the following wasn't stored in the generated .gin files for some reason:
When I added that to the .gin file half of the reported errors went away and I was left w/
That I was able to workaround with that with the following patch on top of v2.3.1:
Edit: |
Same for me thanks so much for the workaround. I also managed to export my 3channel model with this fix adding
|
Hey! I'm receiving an error when trying to export a model with v2.3.1 using the following configs:
!/content/miniconda/bin/rave preprocess --input_path $dataset --output_path $preprocessed_dataset --channels 2 !/content/miniconda/bin/rave train --config v3 --config wasserstein --db_path $preprocessed_dataset --name $name --val_every 500 --channels 2
!/content/miniconda/bin/rave export --run $model_dir --streaming --channels 2 --fidelity 0.999
the error:
INFO:root:library loading INFO:root:DEBUG I1222 19:43:17.716103 140450175820864 export.py:495] building rave /content/miniconda/lib/python3.9/site-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm. warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.") /content/miniconda/lib/python3.9/site-packages/torchaudio/transforms/_transforms.py:94: UserWarning:
return_complexargument is now deprecated and is not effective.
torchaudio.transforms.Spectrogram(power=None)always returns a tensor with complex dtype. Please remove the argument in the function call. warnings.warn( I1222 19:43:19.216365 140450175820864 export.py:505] model found : /content/drive/MyDrive/AI/RAVE/vivaZweiTraining/2023-12-22-testing2-3-1/runs/viva_35fc26584b/version_0/checkpoints/epoch-epoch=0020.ckpt Traceback (most recent call last): File "/content/miniconda/bin/rave", line 8, in <module> sys.exit(main()) File "/content/miniconda/lib/python3.9/site-packages/scripts/main_cli.py", line 38, in main app.run(export.main) File "/content/miniconda/lib/python3.9/site-packages/absl/app.py", line 308, in run _run_main(main, args) File "/content/miniconda/lib/python3.9/site-packages/absl/app.py", line 254, in _run_main sys.exit(main(argv)) File "/content/miniconda/lib/python3.9/site-packages/scripts/export.py", line 513, in main pretrained.load_state_dict( File "/content/miniconda/lib/python3.9/site-packages/torch/nn/modules/module.py", line 2152, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for RAVE: size mismatch for encoder.encoder.net.0.weight_v: copying a param with shape torch.Size([96, 32, 7]) from checkpoint, the shape in current model is torch.Size([96, 16, 7]). size mismatch for decoder.net.32.weight_g: copying a param with shape torch.Size([64, 1, 1]) from checkpoint, the shape in current model is torch.Size([32, 1, 1]). size mismatch for decoder.net.32.weight_v: copying a param with shape torch.Size([64, 96, 7]) from checkpoint, the shape in current model is torch.Size([32, 96, 7]). size mismatch for discriminator.discriminators.0.convs.0.0.weight_v: copying a param with shape torch.Size([32, 2, 5, 1]) from checkpoint, the shape in current model is torch.Size([32, 1, 5, 1]). size mismatch for discriminator.discriminators.1.convs.0.0.weight_v: copying a param with shape torch.Size([32, 2, 5, 1]) from checkpoint, the shape in current model is torch.Size([32, 1, 5, 1]). size mismatch for discriminator.discriminators.2.convs.0.0.weight_v: copying a param with shape torch.Size([32, 2, 5, 1]) from checkpoint, the shape in current model is torch.Size([32, 1, 5, 1]). size mismatch for discriminator.discriminators.3.convs.0.0.weight_v: copying a param with shape torch.Size([32, 2, 5, 1]) from checkpoint, the shape in current model is torch.Size([32, 1, 5, 1]). size mismatch for discriminator.discriminators.4.convs.0.0.weight_v: copying a param with shape torch.Size([32, 2, 5, 1]) from checkpoint, the shape in current model is torch.Size([32, 1, 5, 1]). size mismatch for discriminator.discriminators.5.band_convs.0.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.5.band_convs.1.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.5.band_convs.2.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.5.band_convs.3.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.5.band_convs.4.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.6.band_convs.0.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.6.band_convs.1.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.6.band_convs.2.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.6.band_convs.3.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.6.band_convs.4.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.7.band_convs.0.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.7.band_convs.1.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.7.band_convs.2.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.7.band_convs.3.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]). size mismatch for discriminator.discriminators.7.band_convs.4.0.0.weight_v: copying a param with shape torch.Size([32, 4, 3, 9]) from checkpoint, the shape in current model is torch.Size([32, 2, 3, 9]).
The text was updated successfully, but these errors were encountered: