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

Rave torch to onnx #2

Closed
nagra00 opened this issue Apr 11, 2023 · 6 comments
Closed

Rave torch to onnx #2

nagra00 opened this issue Apr 11, 2023 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@nagra00
Copy link

nagra00 commented Apr 11, 2023

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.

@nagra00 nagra00 changed the title Rave torch to onyx Rave torch to onnx Apr 11, 2023
@faressc
Copy link
Member

faressc commented Apr 19, 2023

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.

@nagra00
Copy link
Author

nagra00 commented Apr 19, 2023

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.

@faressc
Copy link
Member

faressc commented Apr 20, 2023

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!

@vackva vackva added the documentation Improvements or additions to documentation label Apr 26, 2023
@amirpashamobinitehrani
Copy link
Contributor

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!

@nagra00
Copy link
Author

nagra00 commented Apr 28, 2023

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.

@faressc faressc closed this as completed Apr 30, 2023
@vackva
Copy link
Member

vackva commented May 2, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants