Save Flux model to ONNX?

How to save a Flux model to ONNX? Is there currently a way to do it?

Seems to be under rework, have never tried it but you could probably just grab the last working version and later when they have reworked update to that.

Did ONNX.jl actually support saving models? From looking at the repo it seems it supported only loading?

That might be very true, didn’t really look into it :sweat:

We plan to support both - saving and loading. The exact timeframe however is unclear at the moment.

1 Like

Thanks! That would be awesome. Meanwhile I would still be interested in a hacky solution that “works” right now.

Unfortunately there’s no quick and dirty solution for getting ONNX support off the ground, modulo not using julia ML libraries. It’s a massive API to support, so aside from instantiating your own protobufs with ONNX.jl and manually writing weight params into them, there’s not much else that can be done.