acids-ircam / rave_vst

Other
186 stars 28 forks source link

Fix model parsing errors and support mono + v2 models #41

Closed usdivad closed 1 year ago

usdivad commented 1 year ago

Currently the plugin crashes when running certain models (see #27, #28, #35, and #39) -- this PR fixes those model parsing errors.

There are 3 main parts to the fixes (roughly divided by commit):

  1. 5a8b2454549ed17928a4e714395a929c8702cc89: Use encode() when encode_amortized() is unavailable in the model
  2. c17a814783df769932999588b1cb5b84b9548b7d: Check whether model supports stereo -- if not, send mono instead of stereo input into decode(). This enables support for mono models.
  3. 35450abc23a8df7e9c05ea82c4e9a7171b79da7e: Check top_level named_attributes if available (instead of named_buffers within _rave). This enables support for RAVE v2 models.

Tested successfully with all the models currently on the RAVE models download page. However, the darbouka_onnx model doesn't sound quite correct when run -- not sure whether this is due to the model being v2 or ONNX (will continue investigating), but at the very least the plugin should no longer crash.