Skip to content

Conversation

@joncamp
Copy link
Contributor

@joncamp joncamp commented Dec 30, 2024

The chat example is broken currently, as noted in #431. TLDR: Update Onnxruntime-web in chat sample to be v1.20.1

There are two symptoms that are displayed in the console. One is a failure to initialize the session, leading to TypeError: Cannot read properties of undefined (reading 'run'). That error is somewhat ambiguous. However, running under a debugger we see a more descriptive error:

Error: no available backend found. ERR: [webgpu] TypeError: r.requestAdapterInfo is not a function
    at On (ort.webgpu.min.js:6:1623)
    at async e.create (ort.webgpu.min.js:6:18113)
    at async LLM.load (llm.js:113:1)
    at async Init (main.js:256:1)

Per https://issues.chromium.org/issues/346321149, requestAdapterInfo was deprecated. gyagp/onnxruntime@2a70ffd is the associated PR into onnxruntime making the update.

This change only updates the chat sample. Other samples (ort-whisper, quick-start_onnxruntime-web-bundler, sd-turbo, and segment-anything) all use even older onnxruntime-web packages. For sd-turbo, PR #498 submitted an equivalent change for a different issue. Consider updating all of the onnxruntime-web packages.

@snnn snnn merged commit 9467cf0 into microsoft:main Sep 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants