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

customize the wasm paths #1250

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
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.

1 participant