Open ibelem opened 1 week ago
It seems to be related to how we created a new MLContext
per sessions. I have created a PR that adds a cache for MLContext
s so that InferencesSession
s created with the same parameters will use the same MLContext
.
FYI, while testing change to the ORT, I noticed that transformers.js defaults to downloading the .wasm file from a CDN. If we want to use the version this repo, we'll need to set that variable to
transformers.env.backends.onnx.wasm.wasmPaths = "../../assets/dist_transformers/dynamic-runs-1.20-dev/";
Thank you @egalli , I will re-build transformers.js dist once merging the https://github.com/microsoft/onnxruntime/pull/22510 , also set transformers.env.backends.onnx.wasm.wasmPaths.
Thank you @egalli , I will re-build transformers.js dist once merging the microsoft/onnxruntime#22510 , also set transformers.env.backends.onnx.wasm.wasmPaths.
@ibelem - Tis merged.
Hold the dists update since the https://github.com/microsoft/onnxruntime/pull/22278 and https://github.com/microsoft/onnxruntime/pull/22556 cause demos regression.
Failed to execute 'dispatch' on 'MLContext' after landing https://github.com/microsoft/webnn-developer-preview/pull/45
Repro Steps A
Repro Steps B
Actual Result
Failed to execute 'dispatch' on 'MLContext': Invalid inputs: The context of MLGraph doesn't match the context of the MLTensor with name "pixel_values".
@egalli do you have any clue to fix this issue, thanks!
CC @Honry @fdwr @huningxin
Note
This issue didn't occur by using compute() in ORT Web before.
How to build the Transformers.js dists and apply for developer preview image classification demo
npm install
npm run build
/transformers.js/dist
towebnn-developer-preview/assets/dist_transformers/dynamic-runs-1.19-dev/