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

Error in export when using output_mode='raw' #285

Open
Bloos opened this issue Jan 31, 2024 · 0 comments
Open

Error in export when using output_mode='raw' #285

Bloos opened this issue Jan 31, 2024 · 0 comments

Comments

@Bloos
Copy link

Bloos commented Jan 31, 2024

I think I've found another bug in the export module.
When using output_mode = "raw", the export of the trained model will fail with the following stack trace

Traceback (most recent call last):
  File "/home/<user>/.local/bin/rave", line 8, in <module>
    sys.exit(main())
  File "/home/<user>/.local/lib/python3.10/site-packages/scripts/main_cli.py", line 38, in main
    app.run(export.main)
  File "/home/<user>/.local/lib/python3.10/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/<user>/.local/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "/home/<user>/.local/lib/python3.10/site-packages/scripts/export.py", line 566, in main
    scripted_rave = script_class(
  File "/home/<user>/.local/lib/python3.10/site-packages/scripts/export.py", line 168, in __init__
    self.register_method(
  File "/home/<user>/.local/lib/python3.10/site-packages/nn_tilde/__init__.py", line 78, in register_method
    y = getattr(self, method_name)(x)
  File "/home/<user>/.local/lib/python3.10/site-packages/scripts/export.py", line 285, in decode
    y = self.pqmf.inverse(y)
  File "/home/<user>/.local/lib/python3.10/site-packages/rave/pqmf.py", line 289, in inverse
    x = self.inverse_conv(x) * m
  File "/home/<user>/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/<user>/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/<user>/.local/lib/python3.10/site-packages/cached_conv/convs.py", line 221, in forward
    return nn.functional.conv1d(
RuntimeError: Given groups=1, weight of size [16, 16, 33], expected input[1, 1, 8224] to have 16 channels, but got 1 channels instead

which is strange, because pqmf isn't even supposed to be used. I suggest changing line 283 in the export script
if self.pqmf is not None:
to
if self.output_mode == "pqmf":

I didn't create a pull request because I don't know about the implications for other use cases. It fixed the error in my use case though

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

1 participant