microsoft / microsoft/onnxruntime-inference-examples

Stable diffusion web example fails due to missing file

Open
#519 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

javascript
Dominant language
C++
Stars
1.7k
Forks
414
Avg merge
1d 6h
Merged PRs (30d)
14

Description

  1. Go to https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js/sd-turbo
  2. Follow the instructions until: "npm run dev"
  3. In the browser the page spews errors: unet/model.onnx failed, Error: no available backend found. ERR: [webgpu] TypeError: Failed to resolve module specifier dist/ort-wasm-simd-threaded.jsep.mjs text_encoder/model.onnx (cached)
Image

I can see that file is needed here https://github.com/search?q=repo%3Amicrosoft%2Fonnxruntime%20dist%2Fort-wasm-simd-threaded.jsep.mjs&type=code

How to generate such a file?
This is tested on Mac OS 14 Sonoma

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in js/sd-turbo by following the documented setup through npm run dev and inspect how the example resolves dist/ort-wasm-simd-threaded.jsep.mjs. Compare that expected file with the repository's ONNX Runtime search result and determine what setup or generation step is missing. Done means the Stable Diffusion web example loads without the module-resolution and unavailable-backend errors on macOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
machine-learning, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.