mlc-ai / mlc-ai/web-stable-diffusion
building for target webgpu results in "ValueError: At least one GPU backend is expected to be enabled"
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 3.7k
- Forks
- 238
- PR merge metrics
- No merged PRs in 30d
Description
Using version https://github.com/mlc-ai/web-stable-diffusion/tree/ce0c2fbd0fffd7ee39e7be9da34052a8809d98db
environment: Ubuntu 22 LTS server without graphics card.
Executing
python3 build.py --target webgpu
causes the following error:
Traceback (most recent call last):
File "build.py", line 153, in <module>
torch_dev_key = utils.detect_available_torch_device()
File "web_stable_diffusion/utils.py", line 14, in detect_available_torch_device
raise ValueError("At least one GPU backend is expected to be enabled")
ValueError: At least one GPU backend is expected to be enabled
Is it possible to enable a GPU backend in torch even if the building system environment does not provide that GPU backend?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with build.py around the call to utils.detect_available_torch_device(), then read web_stable_diffusion/utils.py at the referenced error. Reproduce the webgpu build on the described GPU-less Ubuntu environment and determine whether the build can proceed without an enabled local backend. Done means the behavior is fixed or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- build-system, machine-learning, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100