-
Notifications
You must be signed in to change notification settings - Fork 3k
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] ONNX Runtime Initialization Fails with irVersion Error #22931
Comments
1.13.1 is quite old. here are the options:
|
Thank you for your reply. Here's what I've tried:
I've tried many methods, including retraining multiple times. Then I found some old posts mentioning that ONNX.js didn't support LSTM? I'd like to know if it's supported now and how I should improve my approach. Here's my model conversion code:
Thank you in advance for your response. |
sorry I forgot to mention that you need to use |
I apologize for any confusion, as I am a complete beginner. Attempted to use the following URLs:
However, both resulted in the following output:
After checking, they are correct URLs. |
is the model URL 404? A full or reproducible example would be helpful. |
The model URL is right. Full Example:
Console Output:
It automatically generated |
I see. it looks like you are importing from https://unpkg.com/[email protected]/dist/ort.webgpu.min.js.
you can specify in code ort.env.wasm.wasmPaths = 'https://cdn.jsdelivr.net/npm/[email protected]/dist/'; |
After that:
So I changed:
The output (cpu or wasm as the same):
|
It seems that the initialization is already completed successfully. The error message should be from this line: // "Cannot read properties of undefined (reading 'find')"
const info = session.inputs.find(input => input.name === name); Which makes sense to me because onnxruntime-web does not define property |
Describe the issue
I am encountering an issue with the ONNX Runtime initialization in my userscript. The error message indicates that the irVersion property is being accessed on a null object, which suggests that the ONNX model is not being loaded correctly. Additionally, the ONNX Runtime version is showing as undefined, which implies that the onnxruntime-web library might not be properly initialized or loaded.
To reproduce
Load the userscript in a browser environment
Observe the console logs for the following error
Console Logs
Related Userscript code
Model Composition
Environment Information:
Version Compatibility Check:
Model Validation: Passed ✓
Web Deployment Compatibility Check (ONNX.js):
Metadata Information:
Urgency
This issue is urgent because it blocks a critical feature in our application that relies on ONNX Runtime for real-time captcha solving. We have a project deadline approaching in two weeks, and resolving this issue is crucial for our deployment schedule.
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
Version: 1.13.1
Execution Provider
'webgl' (WebGL)
The text was updated successfully, but these errors were encountered: