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

Not compatible with onnxruntime-web >= 1.19.0 #8

Open
pocka opened this issue Aug 24, 2024 · 0 comments
Open

Not compatible with onnxruntime-web >= 1.19.0 #8

pocka opened this issue Aug 24, 2024 · 0 comments

Comments

@pocka
Copy link

pocka commented Aug 24, 2024

This package uses1 a versioned WASM binary file of ONNX runtime Web fetched from CDN2.
Due to the WASM file is for [email protected] and [email protected] seems not to be compatible with that WASM file, using this library with [email protected] (and probably later versions) throws an exception at predict().

# Firefox (no stack trace...)
RuntimeError: indirect call to null [ort-wasm-simd-threaded.wasm:7257016:1](https://cdnjs.cloudflare.com/ajax/libs/onnxruntime-web/1.18.0/ort-wasm-simd-threaded.wasm)

# Chrome
ort-wasm-simd-threaded.wasm:0x6ebbb8 
Uncaught (in promise) RuntimeError: null function or function signature mismatch
    at ort-wasm-simd-threaded.wasm:0x6ebbb8
    at Jr (onnxruntime-web.js?v=a0152505:13175:39)
    at Xa (onnxruntime-web.js?v=a0152505:13585:129)
    at c (onnxruntime-web.js?v=a0152505:13588:13)
    at we (onnxruntime-web.js?v=a0152505:13069:20)
    at onnxruntime-web.js?v=a0152505:13555:17

Adding an escape-hatch like #7 would solve this problem.
Or, narrowing peerDependencies.onnxruntime-web to 1.18.x would reduce the chance of users installing >= 1.19.0.
As a workaround, users can avoid the error by pinning onnxruntime-web to 1.18.0 in project's package.json.

Steps to reproduce

  1. Clone this repository
  2. Delete package-lock.json
  3. Install dependencies (npm i)
  4. Run npm run dev
  5. Open the page (http://localhost:5173)
  6. Open browser console
  7. Press Predict
  8. An error appears on the console

Footnotes

  1. https://github.com/diffusionstudio/vits-web/blob/57264de991ada4bc2eaafea588d69058277e24bf/src/inference.ts#L20

  2. https://github.com/diffusionstudio/vits-web/blob/57264de991ada4bc2eaafea588d69058277e24bf/src/fixtures.ts#L11

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

No branches or pull requests

1 participant