Skip to content

Conversation

@Honry
Copy link
Contributor

@Honry Honry commented Feb 28, 2024

This is a very rough example to enable WebNN in transformer.js. I just add some hard codes to make the "Image classification w/ google/vite-base-patch16-224" fp32 model work with ORT Web WebNN EP.

WebNN EP was released in onnxruntime-web dev channel started from 1.18.0-dev.20240126, so this PR depends on Guenther's #596 to make transformers.js work with latest ORT Web.

Please note WebNN DirectML backend is only available on Win 11 with latest Chrome Canary or Edge Canary behind "Enables WebNN API" flag.

guschmue and others added 2 commits February 22, 2024 13:33
This is a very rough example to enable WebNN in transformers.js.
I just add some hard codes to make the "Image classification w/ google/vite-base-patch16-224"
fp32 model work with ORT Web WebNN EP.

This PR depends on huggingface#596
@sansmoraxz
Copy link

WebNN support is out on ort.

v1.17.3

Also chrome and edge are shipping with the API available in the chrome://flags.

@Honry
Copy link
Contributor Author

Honry commented May 20, 2024

WebNN support is out on ort.

v1.17.3

Also chrome and edge are shipping with the API available in the chrome://flags.

Yeah, WebNN has been released in 1.18.0, and enabled behind Chrome flag: "Enables WebNN API".

This is very early experimental to explore WebNN integration in transformers.js.

@xenova
Copy link
Collaborator

xenova commented May 23, 2024

Great news! Thanks @Honry. Transformers.js v3 will use onnxruntime-web >= 1.18.0, so all updates should be made to the v3 branch (PR). I'll close this draft PR, but will reference it in v3 as well as for the PR which eventually adds WebNN support.

@Honry
Copy link
Contributor Author

Honry commented May 24, 2024

@xenova thank you for adding WebNN support to v3 plan, it's truly thrilling! Please feel free to reach out if there's anything we can support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants