Since the following two PRs have been merged and available in https://www.npmjs.com/package/onnxruntime-web/v/1.22.0-dev.20250306-ccf8fdd9ea , I tried to build latest Transformers.js dist based on 1.22.0-dev.20250306-ccf8fdd9ea to verify #69 .
Tried the ibelem/transformers.js@6cb6a4d and ibelem@a4fc70f to use ORT Web 1.22.0-dev.20250306-ccf8fdd9ea and Transformers.js 3.4.0 , but the no active session at get currentSessionId error occurs in the demo.
Repro Steps:
- Enable WebNN on Chrome Canary
- Visit Image Classification demo https://ibelem.github.io/webnn-developer-preview/demos/image-classification/?provider=webnn&devicetype=gpu&model=mobilenet-v2&run=1
- Click
Classify button
Actual Result
PASS
Repro Steps: (cont.)
- Click
Classify button again
Actual Result
Uncaught (in promise) Error: No active session at get currentSessionId ( at dn.ensureTensor

This issue is also reproducible when switching to another models and clicking Classify button after step 3.
Enrico Galli (@egalli) Could you please help to investigate this issue, or please let me know if I missed somthing. Thank you!
Since the following two PRs have been merged and available in https://www.npmjs.com/package/onnxruntime-web/v/1.22.0-dev.20250306-ccf8fdd9ea , I tried to build latest Transformers.js dist based on 1.22.0-dev.20250306-ccf8fdd9ea to verify #69 .
Tried the ibelem/transformers.js@6cb6a4d and ibelem@a4fc70f to use ORT Web 1.22.0-dev.20250306-ccf8fdd9ea and Transformers.js 3.4.0 , but the
no active session at get currentSessionIderror occurs in the demo.Repro Steps:
ClassifybuttonActual Result
PASSRepro Steps: (cont.)
Classifybutton againActual Result
Uncaught (in promise) Error: No active session at get currentSessionId ( at dn.ensureTensorThis issue is also reproducible when switching to another models and clicking
Classifybutton after step 3.Enrico Galli (@egalli) Could you please help to investigate this issue, or please let me know if I missed somthing. Thank you!