{"id":13910622,"url":"https://github.com/ssube/onnx-web","last_synced_at":"2025-05-16T04:06:09.841Z","repository":{"id":65202933,"uuid":"585624391","full_name":"ssube/onnx-web","owner":"ssube","description":"web UI for GPU-accelerated ONNX pipelines like Stable Diffusion, even on Windows and AMD","archived":false,"fork":false,"pushed_at":"2025-05-09T23:40:20.000Z","size":24265,"stargazers_count":215,"open_issues_count":73,"forks_count":29,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-10T00:28:37.396Z","etag":null,"topics":["ai-art","amd","diffusion","esrgan","flask","generative-art","gfpgan","image-generation","linux","nvidia","python","pytorch","reactjs","stable-diffusion","super-resolution","text2image","upscaling","web-app","windows"],"latest_commit_sha":null,"homepage":"https://discord.gg/7CdQmutGuw","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssube.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-05T16:41:20.000Z","updated_at":"2025-04-24T04:52:44.000Z","dependencies_parsed_at":"2023-09-26T09:19:41.196Z","dependency_job_id":"e71c7bce-618e-4157-a7da-0bb24543b761","html_url":"https://github.com/ssube/onnx-web","commit_stats":{"total_commits":1202,"total_committers":3,"mean_commits":400.6666666666667,"dds":0.006655574043261225,"last_synced_commit":"38d9be27439f6e997b95d901121937e3da38c9b6"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssube%2Fonnx-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssube%2Fonnx-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssube%2Fonnx-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssube%2Fonnx-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssube","download_url":"https://codeload.github.com/ssube/onnx-web/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464895,"owners_count":22075570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-art","amd","diffusion","esrgan","flask","generative-art","gfpgan","image-generation","linux","nvidia","python","pytorch","reactjs","stable-diffusion","super-resolution","text2image","upscaling","web-app","windows"],"created_at":"2024-08-07T00:01:38.530Z","updated_at":"2025-05-16T04:06:04.831Z","avatar_url":"https://github.com/ssube.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# onnx-web\n\nonnx-web is designed to simplify the process of running Stable Diffusion and other [ONNX models](https://onnx.ai) so you\ncan focus on making high quality, high resolution art. With the efficiency of hardware acceleration on both AMD and\nNvidia GPUs, and offering a reliable CPU software fallback, it offers the full feature set on desktop, laptops, and\nmulti-GPU servers with a seamless user experience.\n\nYou can navigate through the user-friendly web UI, hosted on Github Pages and accessible across all major browsers,\nincluding your go-to mobile device. Here, you have the flexibility to choose diffusion models and accelerators for each\nimage pipeline, with easy access to the image parameters that define each modes. Whether you're uploading images or\nexpressing your artistic touch through inpainting and outpainting, onnx-web provides an environment that's as\nuser-friendly as it is powerful. Recent output images are neatly presented beneath the controls, serving as a handy\nvisual reference to revisit previous parameters or remix your earlier outputs.\n\nDive deeper into the onnx-web experience with its API, compatible with both Linux and Windows. This RESTful interface\nseamlessly integrates various pipelines from the [HuggingFace diffusers](https://huggingface.co/diffusers/main/en/index)\nlibrary, offering valuable metadata on models and accelerators, along with detailed outputs from your creative runs.\n\nEmbark on your generative art journey with onnx-web, and explore its capabilities through our detailed documentation\nsite. Find a comprehensive getting started guide, setup guide, and user guide waiting to empower your creative\nendeavors!\n\nPlease [check out the documentation site](https://www.onnx-web.ai/docs/) for more info:\n\n- [getting started guide](https://www.onnx-web.ai/docs/getting-started/)\n- [setup guide](https://www.onnx-web.ai/docs/setup-guide/)\n- [user guide](https://www.onnx-web.ai/docs/user-guide/)\n\n![preview of txt2img tab using SDXL to generate ghostly astronauts eating weird hamburgers on an abandoned space station](./docs/readme-sdxl.png)\n\n## Features\n\nThis is an incomplete list of new and interesting features:\n\n- supports SDXL and SDXL Turbo\n- wide variety of schedulers: DDIM, DEIS, DPM SDE, Euler Ancestral, LCM, UniPC, and more\n- hardware acceleration on both AMD and Nvidia\n  - tested on CUDA, DirectML, and ROCm\n  - [half-precision support for low-memory GPUs](docs/user-guide.md#optimizing-models-for-lower-memory-usage) on both\n    AMD and Nvidia\n  - software fallback for CPU-only systems\n- web app to generate and view images\n  - [hosted on Github Pages](https://ssube.github.io/onnx-web), from your CDN, or locally\n  - [persists your recent images and progress as you change tabs](docs/user-guide.md#image-history)\n  - queue up multiple images and retry errors\n  - translations available for English, French, German, and Spanish (please open an issue for more)\n- supports many `diffusers` pipelines\n  - [txt2img](docs/user-guide.md#txt2img-tab)\n  - [img2img](docs/user-guide.md#img2img-tab)\n  - [inpainting](docs/user-guide.md#inpaint-tab), with mask drawing and upload\n  - [panorama](docs/user-guide.md#panorama-pipeline), for both SD v1.5 and SDXL\n  - [upscaling](docs/user-guide.md#upscale-tab), with ONNX acceleration\n- [add and use your own models](docs/user-guide.md#adding-your-own-models)\n  - [convert models from diffusers and SD checkpoints](docs/converting-models.md)\n  - [download models from HuggingFace hub, Civitai, and HTTPS sources](docs/user-guide.md#model-sources)\n- blend in additional networks\n  - [permanent and prompt-based blending](docs/user-guide.md#permanently-blending-additional-networks)\n  - [supports LoRA and LyCORIS weights](docs/user-guide.md#lora-tokens)\n  - [supports Textual Inversion concepts and embeddings](docs/user-guide.md#textual-inversion-tokens)\n    - each layer of the embeddings can be controlled and used individually\n- ControlNet\n  - image filters for edge detection and other methods\n  - with ONNX acceleration\n- highres mode\n  - runs img2img on the results of the other pipelines\n  - multiple iterations can produce 8k images and larger\n- [multi-stage](docs/user-guide.md#prompt-stages) and [region prompts](docs/user-guide.md#region-tokens)\n  - seamlessly combine multiple prompts in the same image\n  - provide prompts for different areas in the image and blend them together\n  - change the prompt for highres mode and refine details without recursion\n- infinite prompt length\n  - [with long prompt weighting](docs/user-guide.md#long-prompt-weighting)\n- [image blending mode](docs/user-guide.md#blend-tab)\n  - combine images from history\n- upscaling and correction\n  - upscaling with Real ESRGAN, SwinIR, and Stable Diffusion\n  - face correction with CodeFormer and GFPGAN\n- [API server can be run remotely](docs/server-admin.md)\n  - REST API can be served over HTTPS or HTTP\n  - background processing for all image pipelines\n  - polling for image status, plays nice with load balancers\n- OCI containers provided\n  - for all supported hardware accelerators\n  - includes both the API and GUI bundle in a single container\n  - runs well on [RunPod](https://www.runpod.io/), [Vast.ai](https://vast.ai/), and other GPU container hosting services\n\n## Contents\n\n- [onnx-web](#onnx-web)\n  - [Features](#features)\n  - [Contents](#contents)\n  - [Setup](#setup)\n    - [Adding your own models](#adding-your-own-models)\n  - [Usage](#usage)\n    - [Known errors and solutions](#known-errors-and-solutions)\n    - [Running the containers](#running-the-containers)\n  - [Credits](#credits)\n\n## Setup\n\nThere are a few ways to run onnx-web:\n\n- cross-platform:\n  - [clone this repository, create a virtual environment, and run `pip install`](docs/setup-guide.md#cross-platform-method)\n  - [pulling and running the OCI containers](docs/server-admin.md#running-the-containers)\n- on Windows:\n  - [clone this repository and run one of the `setup-*.bat` scripts](docs/setup-guide.md#windows-python-installer)\n  - [download and run the experimental all-in-one bundle](docs/setup-guide.md#windows-all-in-one-bundle)\n\nYou only need to run the server and should not need to compile anything. The client GUI is hosted on Github Pages and\nis included with the Windows all-in-one bundle.\n\nThe extended setup docs have been [moved to the setup guide](docs/setup-guide.md).\n\n### Adding your own models\n\nYou can [add your own models](./docs/user-guide.md#adding-your-own-models) by downloading them from the HuggingFace Hub\nor Civitai or by converting them from local files, without making any code changes. You can also download and blend in\nadditional networks, such as LoRAs and Textual Inversions, using [tokens in the\nprompt](docs/user-guide.md#prompt-tokens).\n\n## Usage\n\n### Known errors and solutions\n\nPlease see [the Known Errors section of the user guide](https://github.com/ssube/onnx-web/blob/main/docs/user-guide.md#known-errors).\n\n### Running the containers\n\nThis has [been moved to the server admin guide](docs/server-admin.md#running-the-containers).\n\n## Credits\n\nSome of the conversion and pipeline code was copied or derived from code in:\n\n- [`Amblyopius/Stable-Diffusion-ONNX-FP16`](https://github.com/Amblyopius/Stable-Diffusion-ONNX-FP16)\n  - GPL v3: https://github.com/Amblyopius/Stable-Diffusion-ONNX-FP16/blob/main/LICENSE\n  - https://github.com/Amblyopius/Stable-Diffusion-ONNX-FP16/blob/main/pipeline_onnx_stable_diffusion_controlnet.py\n  - https://github.com/Amblyopius/Stable-Diffusion-ONNX-FP16/blob/main/pipeline_onnx_stable_diffusion_instruct_pix2pix.py\n- [`d8ahazard/sd_dreambooth_extension`](https://github.com/d8ahazard/sd_dreambooth_extension)\n  - Non-commerical license: https://github.com/d8ahazard/sd_dreambooth_extension/blob/main/license.md\n  - https://github.com/d8ahazard/sd_dreambooth_extension/blob/main/dreambooth/sd_to_diff.py\n- [`huggingface/diffusers`](https://github.com/huggingface/diffusers)\n  - Apache v2: https://github.com/huggingface/diffusers/blob/main/LICENSE\n  - https://github.com/huggingface/diffusers/blob/main/scripts/convert_stable_diffusion_checkpoint_to_onnx.py\n- [`uchuusen/onnx_stable_diffusion_controlnet`](https://github.com/uchuusen/onnx_stable_diffusion_controlnet)\n  - GPL v3: https://github.com/uchuusen/onnx_stable_diffusion_controlnet/blob/main/LICENSE\n- [`uchuusen/pipeline_onnx_stable_diffusion_instruct_pix2pix`](https://github.com/uchuusen/pipeline_onnx_stable_diffusion_instruct_pix2pix)\n  - Apache v2: https://github.com/uchuusen/pipeline_onnx_stable_diffusion_instruct_pix2pix/blob/main/LICENSE\n\nThose parts have their own licenses with additional restrictions on commercial usage, modification, and redistribution.\nThe rest of the project is provided under the MIT license, and I am working to isolate these components into a library.\n\nThere are many other good options for using Stable Diffusion with hardware acceleration, including:\n\n- https://github.com/Amblyopius/AMD-Stable-Diffusion-ONNX-FP16\n- https://github.com/azuritecoin/OnnxDiffusersUI\n- https://github.com/ForserX/StableDiffusionUI\n- https://github.com/pingzing/stable-diffusion-playground\n- https://github.com/quickwick/stable-diffusion-win-amd-ui\n\nGetting this set up and running on AMD would not have been possible without guides by:\n\n- https://gist.github.com/harishanand95/75f4515e6187a6aa3261af6ac6f61269\n- https://gist.github.com/averad/256c507baa3dcc9464203dc14610d674\n- https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs\n- https://www.travelneil.com/stable-diffusion-updates.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssube%2Fonnx-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssube%2Fonnx-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssube%2Fonnx-web/lists"}