Skip to content

customize the wasm paths #1250

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

Merged
merged 2 commits into from
Apr 25, 2025

Conversation

fs-eire
Copy link
Contributor

@fs-eire fs-eire commented Mar 21, 2025

This PR updates the logics to have a better customized wasmPaths setting. Specifically, the following changes were made:

  • (Safari) Fallback to non ASYNCIFY build of webassembly, because of an OOM issue: 🐛 v3 crashes on iOS and macOS devices due to increasing memory usage #1242

    • This fallback does not affect any existing feature, because WebGPU is not available on Safari yet anyway
  • Because of the fallback feature, we need to access file ort-wasm-simd-threaded.mjs and ort-wasm-simd-threaded.wasm, which is not in package @huggingface/transformers. point to onnxruntime-web.

  • only apply override to wasmPaths when env.backends.onnx.versions.web exists. The only situation that it does not exist is the nodejs build.

The feature need to be well tested.

@fs-eire fs-eire changed the title [WIP] customize the wasm paths customize the wasm paths Mar 21, 2025
@fs-eire fs-eire marked this pull request as ready for review March 21, 2025 17:48
@xenova
Copy link
Collaborator

xenova commented Apr 25, 2025

Thanks for this! I'll do some additional testing, and hopefully have this included with #1231.

@xenova
Copy link
Collaborator

xenova commented Apr 25, 2025

Superseded by #1231

@xenova xenova closed this Apr 25, 2025
@xenova xenova reopened this Apr 25, 2025
@xenova xenova changed the base branch from main to ort-improvements April 25, 2025 22:45
@xenova xenova merged commit bdaead0 into huggingface:ort-improvements Apr 25, 2025
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.

None yet

2 participants