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

[Web] #21318

Open
guanzongjiang opened this issue Jul 11, 2024 · 1 comment
Open

[Web] #21318

guanzongjiang opened this issue Jul 11, 2024 · 1 comment
Assignees
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@guanzongjiang
Copy link

Describe the issue

Error: no available backend found. ERR: [wasm] RuntimeError: Aborted(LinkError: WebAssembly.instantiate(): Import #46 "a" "V": function import requires a callable). Build with -sASSERTIONS for more info., [cpu] Error: previous call to 'initWasm()' failed.
at Dn (onnxruntime-web.js?v=641f318a:80:13)
at async a.create (onnxruntime-web.js?v=641f318a:600:20)
at async initModel (AnythingModel.vue:44:17)
at async initSegment (AnythingModel.vue:26:7)
at async AnythingModel.vue:137:3

To reproduce

vue3+vite
ort.env.wasm.wasmPaths = {
'ort-wasm.wasm': 'https://cdnjs.cloudflare.com/ajax/libs/onnxruntime-web/1.14.0/ort-wasm.wasm',
'ort-wasm-threaded.wasm':
'https://cdnjs.cloudflare.com/ajax/libs/onnxruntime-web/1.14.0/ort-wasm-threaded.wasm',
'ort-wasm-simd.wasm':
'https://cdnjs.cloudflare.com/ajax/libs/onnxruntime-web/1.14.0/ort-wasm-simd.wasm',
'ort-wasm-simd-threaded.wasm':
'https://cdnjs.cloudflare.com/ajax/libs/onnxruntime-web/1.14.0/ort-wasm-simd-threaded.wasm'
}

var modelFile : string = "http://localhost:5173/anythingModel/sam_onnx_quantized_example.onnx";
model = await InferenceSession.create(modeUrl);

Urgency

No response

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

1.18.0

Execution Provider

'wasm'/'cpu' (WebAssembly CPU)

@guanzongjiang guanzongjiang added the platform:web issues related to ONNX Runtime web; typically submitted using template label Jul 11, 2024
@fs-eire
Copy link
Contributor

fs-eire commented Jul 15, 2024

When specifying web assembly file path override, the version of the .wasm file(s) need to match the JavaScript file version (NPM package onnxruntime-web, or the version specified in the ort.min.js). Using v1.18.0 with path override to .wasm files of v1.14.0 will not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

3 participants