Skip to main content

onnx-web

onnx-web is a tool for running Stable Diffusion and other ONNX models with hardware acceleration, on both AMD and Nvidia GPUs and with a CPU software fallback.

The GUI is hosted on Github Pages and runs in all major browsers, including on mobile devices. It allows you to select the model and accelerator being used for each image pipeline. Image parameters are shown for each of the major modes, and you can either upload or paint the mask for inpainting and outpainting. The last few output images are shown below the image controls, making it easy to refer back to previous parameters or save an image from earlier.

The API runs on both Linux and Windows and provides a REST API to run many of the pipelines from diffusers , along with metadata about the available models and accelerators, and the output of previous runs. Hardware acceleration is supported on both AMD and Nvidia for both Linux and Windows, with a CPU fallback capable of running on laptop-class machines.

Please check out the setup guide to get started and the user guide for more details.

preview of txt2img tab using SDXL to generate ghostly astronauts eating weird hamburgers on an abandoned space station

Features

This is an incomplete list of new and interesting features, with links to the user guide:

Contents

Setup

There are a few ways to run onnx-web:

You only need to run the server and should not need to compile anything. The client GUI is hosted on Github Pages and is included with the Windows all-in-one bundle.

The extended setup docs have been moved to the setup guide.

Adding your own models

You can add your own models by downloading them from the HuggingFace Hub or Civitai or by converting them from local files, without making any code changes. You can also download and blend in additional networks, such as LoRAs and Textual Inversions, using tokens in the prompt.

Usage

Known errors and solutions

Please see the Known Errors section of the user guide.

Running the containers

This has been moved to the server admin guide.

Credits

Some of the conversion and pipeline code was copied or derived from code in:

Those parts have their own licenses with additional restrictions on commercial usage, modification, and redistribution. The rest of the project is provided under the MIT license, and I am working to isolate these components into a library.

There are many other good options for using Stable Diffusion with hardware acceleration, including:

Getting this set up and running on AMD would not have been possible without guides by:

Metadata

Release files for onnx-web 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onnx-web 0.12.0
File Size Uploaded
onnx-web-0.12.0.tar.gz 65.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for onnx-web 0.12.0
File Interpreter ABI Platform
onnx_web-0.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 151.6 kB

Release files / onnx-web-0.12.0.tar.gz

Download URL onnx-web-0.12.0.tar.gz
Size 65.9 kB
Tags Source
SHA-256 checksum
How to use checksums
58b20ee480c281a9e36119c807208363d341f8a51e86d07d792e45916ad59cef
BLAKE2b-256 checksum
How to use checksums
ad6fa38c5d1cc87686c4b0840e2e97eb5b5255b14083b5b42e42a25a6d2d33dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / onnx_web-0.12.0-py3-none-any.whl

Download URL onnx_web-0.12.0-py3-none-any.whl
Size 85.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6595952cc22cd769e14dc419d7a66a278be877f037f4fbc5fa8e007de88a288a
BLAKE2b-256 checksum
How to use checksums
f1e11ba0bbba5a8bf8e49314a0b374554f696a43282ca3fb0ef60812790b8f84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.6.1

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.2.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page