Torsion-Audio/Scyclone

Rave torch to onnx

Closed this issue · 6 comments

Congratulations on this really great application.

I am using the latest version of onnx and had to make a small adjustment due to an API change.... no big deal.

It would be nice if you could put a script to convert RAVE torch models to onnx in the repository.

Hi @nagra00,
thanks for reaching out. Happy to hear you like Scyclone!
We are currently working on a second repository, with instructions on how to train and convert the RAVE models. In order to export to onnx, specific flags in the RAVE training are required. We will keep you updated as soon as the repository is online.
Also we are working on linking the onnx library as a static library (check out our new develop branch). So there are news to come.

So this means that it is not possible to convert an already trained torch model to onnx?

Static or dynamic onnx makes no difference to me. For MacOS 10.13 i have to compile Scyclone anyway. I took a quick look at the dev branch and noticed that you have already adapted the code to the onnx API change.

So this means that it is not possible to convert an already trained torch model to onnx?

Yes it is possible that models which have been trained without these flags can't be converted to onnx properly. But more info on that very soon.

I took a quick look at the dev branch and noticed that you have already adapted the code to the onnx API change.

Yes, thanks for the hint!

Hi @nagra00!

As already mentioned above specific flags are required to be passed to the training script in order to successfully export onnx models for Scyclone. It is still probable to export already trained RAVE models to onnx without those flags. I assume you have already tried:

rave export_onnx --run /path/to/the/run/directory

If the script returns an error, could you please send over the training .gin file as well as the error message so we can take a look at it? Thanks for your patience in the meantime!

Hi,

I have not trained any models myself, it just takes way too long.

What I was looking for is a conversion of the existing RAVE models to onnx. I thought this would be possible by keeping the tensors and replacing the algebraic parts with appropriate onnx versions. But as I understand it, this is not possible.

vackva commented

There are some existing onnx RAVE models you can use with Scyclone:
https://github.com/caillonantoine/ravejs/tree/master/models