onnx weight not work when using nodejs with @xenova/transformers 2.x

#4
by wujohns - opened

The onnx model can't be loaded:
TypeError [ERR_WORKER_PATH]: The worker script or module filename must be an absolute path or a relative path starting with './' or '../'. Received "blob:nodedata:e3ca7776-b9a2-46cb-9833-cffd069bc82c"
at new NodeError (node:internal/errors:405:5)
at new Worker (node:internal/worker:168:15)
at Object.yc (/root/projects/ai-service-list/node_modules/onnxruntime-web/dist/ort-web.node.js:6:7890)
at Object.Cc (/root/projects/ai-service-list/node_modules/onnxruntime-web/dist/ort-web.node.js:6:7948)
at lt (/root/projects/ai-service-list/node_modules/onnxruntime-web/dist/ort-web.node.js:6:5690)
at Et (/root/projects/ai-service-list/node_modules/onnxruntime-web/dist/ort-web.node.js:6:9720)
at wasm://wasm/025ff5d6:wasm-function[10917]:0x7f0507
at wasm://wasm/025ff5d6:wasm-function[1580]:0xf3ecb
at wasm://wasm/025ff5d6:wasm-function[2786]:0x1d31ee
at wasm://wasm/025ff5d6:wasm-function[5903]:0x49713d {
code: 'ERR_WORKER_PATH'
}

Sign up or log in to comment