pykeio / ort

Fast ML inference & training for Rust with ONNX Runtime
https://ort.pyke.io/
Apache License 2.0
871 stars 101 forks source link

feat: onnxruntime wasm support + example #175

Closed mosure closed 7 months ago

mosure commented 7 months ago

https://onnxruntime.ai/docs/build/web.html

a native/web symmetric wrapper API would be really neat

decahedron1 commented 7 months ago

WASM is supported since v1.15.5. https://ort.pyke.io/setup/platforms

The existing gpt2 & custom-ops examples work in WASM (the others use show-image which isn't supported in WASM, but you can just remove that, the inference part works fine). I believe you need to disable the fetch-models feature and refactor commit_from_url -> commit_from_file though.