Uncaught (in promise) Error: no available backend found. ERR: [wasm] TypeError: Cannot read properties of undefined (reading 'buffer'), [cpu] Error: previous call to 'initializeWebAssembly()' failed., [xnnpack] Error: previous call to 'initializeWebAssembly()' failed.[Web] #20463
Labels
platform:web
issues related to ONNX Runtime web; typically submitted using template
Describe the issue
import { Models } from '../type';
import Editor from '../Editor';
import { env, InferenceSession } from 'onnxruntime-web';
import SAM from '@/model/modelFiles/sam_quantized.onnx?url';
import ortWasm from '@/model/modelWasm/ort-wasm.wasm?url';
import ortWasmSimd from '@/model/modelWasm/ort-wasm-simd.wasm?url';
import ortWasmThreaded from '@/model/modelWasm/ort-wasm-threaded.wasm?url';
import ortWasmSimdThreaded from '@/model/modelWasm/ort-wasm-simd-threaded.wasm?url';
env.debug = true;
// log level
env.logLevel = 'info';
// wasm
env.wasm.numThreads = 2;
env.wasm.simd = true;
env.wasm.wasmPaths = {
'ort-wasm.wasm': ortWasm,
'ort-wasm-simd.wasm': ortWasmSimd,
'ort-wasm-threaded.wasm': ortWasmThreaded,
'ort-wasm-simd-threaded.wasm': ortWasmSimdThreaded,
};
export default class ModelManager {
editor: Editor;
modelMap: Map<Models, InferenceSession> = new Map();
modelPath: Record<Models, string> = {
[Models.SAM]: SAM,
};
}
When I run the run model here, the program gets an error and the version I'm using is 1.17.3.
To reproduce
vite + vue3+onnxruntime-web1.17.3
Urgency
No response
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
1.17.3
Execution Provider
'wasm'/'cpu' (WebAssembly CPU)
The text was updated successfully, but these errors were encountered: