-
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] Unsupported model IR version: 9, max supported IR version: 8 #16638
Comments
will make a change to upgrade IR version support |
Submitted a PR for the upstream package 'onnx-proto': chaosmail/onnx-proto#7 Once it's get merged and released a new version, I can upgrade onnxruntime-web to consume it |
### Description This change upgrades a lot of dependencies. There are 2 motivations of doing this change: - fix the security issue reported by dependabot (protobufjs Prototype Pollution vulnerability - GHSA-h755-8qp9-cq85) - resolve the requirement of using ONNX IR_VERSION 9 (#16638) This requires: - upgrade protobufjs to v7.2.4 - upgrade library 'onnx-proto' to consume latest ONNX release (v1.14.0). Problems: - protobufjs v7.2.4 depends on long.js v5, which does not work well with typescript (commonjs). - onnx-proto depends on this fix with a new release of long.js - long.js is in maintenance and it takes longer than expected to put in new changes Solutions: - use a patch script in `preprepare` to copy type declarations to make long.js work with typescript (commonjs) - generate onnx protobuf JS/TS files and put them under js/web/lib/onnxjs/ort-schema/protobuf folder - remove 'onnx-proto' from dependency. - apply fixes to generated onnx.d.ts
Any updates? |
I think this issue should have been fixed in #16722. |
similar |
Which execution provider and which version are you using? |
@fs-eire provider is cpu after downscale the version of onnx to 1.15, the error is missed. |
I see. Onnxruntime 1.17.1 is relatively outdated and latest dev channel should support IR v10 |
### Description This change upgrades a lot of dependencies. There are 2 motivations of doing this change: - fix the security issue reported by dependabot (protobufjs Prototype Pollution vulnerability - GHSA-h755-8qp9-cq85) - resolve the requirement of using ONNX IR_VERSION 9 (microsoft#16638) This requires: - upgrade protobufjs to v7.2.4 - upgrade library 'onnx-proto' to consume latest ONNX release (v1.14.0). Problems: - protobufjs v7.2.4 depends on long.js v5, which does not work well with typescript (commonjs). - onnx-proto depends on this fix with a new release of long.js - long.js is in maintenance and it takes longer than expected to put in new changes Solutions: - use a patch script in `preprepare` to copy type declarations to make long.js work with typescript (commonjs) - generate onnx protobuf JS/TS files and put them under js/web/lib/onnxjs/ort-schema/protobuf folder - remove 'onnx-proto' from dependency. - apply fixes to generated onnx.d.ts
Describe the issue
Unlike the
onnxruntime
python library, the web version does not yet support model IR version 9. I believe this is due to theonnx-proto
dependency being quite out-of-date (last update published over a year ago).Looking at their distributed "onnx.js" file (https://www.npmjs.com/package/onnx-proto?activeTab=code), IR_VERSION=8 is the latest entry into the version object. On the other hand, netron supports IR_VERSION=9, and this is the onnx-proto.js file that they use: https://github.com/lutzroeder/netron/blob/main/source/onnx-proto.js
Logs:
To reproduce
Load a model exported with
onnx>=1.14.0
Urgency
I am able to work around it by exporting models with
onnx==1.13.1
, however, the web version should ideally match the python version (which is able to run IR_VERSION=9).ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.15.1
Execution Provider
'wasm'/'cpu' (WebAssembly CPU)
The text was updated successfully, but these errors were encountered: