stable-diffusion-webui
Browser interface for running Stable Diffusion image generation locally.
- Stars
- 165,373 stars
- Forks
- 31k forks
- Last push
- 8 months ago
- Activity
- Slowing down
# Clone the repository$ git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui# Start it on Linux$ ./webui.shCommands from the project's README. Run them after installing (see below).
Overview
Understand stable-diffusion-webui in 60 seconds
- What it does
- Stable Diffusion web UI is a browser interface for generating images with Stable Diffusion on your own computer. It covers text-to-image and image-to-image, inpainting, outpainting, upscaling, LoRAs and embeddings, and a long list of extras, all through a Gradio web page.
- The problem it solves
- Running Stable Diffusion from scripts is fiddly. This web UI wraps it in a feature-rich interface with a one-click install and run script, so you can generate and refine images without writing code.
- Why choose it
- Choose it for a mature, well-known interface with a huge feature set and extensions. Note it needs Python 3.10.6 on Windows, because newer Python versions don't support its torch version.
- Who should use it
- Artists and hobbyists generating AI images
- Users who want a classic, feature-rich Stable Diffusion UI
- People with modest GPUs (4 GB, reportedly 2 GB)
- Users training embeddings and hypernetworks
- Setup difficulty
You'll need:
- Python 3.10.6 (Windows) or Python 3.10/3.11 (Linux) and git
- An NVIDIA GPU is recommended; AMD, Intel and Apple Silicon have guides
- 4 GB of VRAM (reports of 2 GB working)
How stable-diffusion-webui works
The web UI offers txt2img and img2img, inpainting and outpainting, prompt attention syntax, negative prompts, styles, variations, X/Y/Z plots, Highres Fix and a checkpoint merger. The Extras tab adds face restoration (GFPGAN, CodeFormer) and upscalers like RealESRGAN and SwinIR.
It supports textual inversion embeddings, hypernetworks and LoRAs, with a training tab. Generation parameters are saved inside each image, so you can drag an image to the PNG info tab to restore them. Custom scripts and community extensions add more, and there's an API.
Installation uses a one-click script, but you still need Python and git. On Windows with an NVIDIA GPU you can use the sd.webui.zip release package instead. The project is AGPL-3.0 licensed.
Features
Key features
txt2img and img2img
The core generation modes.
Inpainting and outpainting
Edit and extend images.
LoRAs and embeddings
Add styles and concepts.
Upscalers and face fixes
RealESRGAN, SwinIR, GFPGAN, CodeFormer.
Parameters in images
Restore settings from a PNG.
Extensions and API
Community scripts and programmatic access.
Strengths
- Huge feature set
- Large extension ecosystem
- Works on low-VRAM GPUs
- One-click install and run scripts
Limitations
- Windows requires Python 3.10.6
- Apple Silicon, AMD and Intel setup lives on the wiki
- AGPL-3.0 license
Practical use cases
Generate artwork
Create images from prompts.
Fix and upscale photos
Use the Extras tab.
Train embeddings
Teach the model a new concept.
Installation
Install stable-diffusion-webui
Commands come from Stable Diffusion web UI's README. AIRepoHub hasn't run them yet. View source
Prerequisites
- Python 3.10
- git
Supported systems
- Windows
- Linux
- macOS
- 1
Download sd.webui.zip
From the v1.0.0-pre release, then extract it.
- 2
Update
Run update.bat.
- 3
Start
Run run.bat.
- 1
Install Python 3.10.6 and git
Tick Add Python to PATH. Newer Python versions don't support torch here.
- 2
Clone the repository
PowerShellgit clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git - 3
Start it
Run webui-user.bat from Windows Explorer as a normal, non-administrator user.
- 1
Install dependencies (Debian-based)
The README also lists Red Hat, openSUSE and Arch commands.
Shellsudo apt install wget git python3 python3-venv libgl1 libglib2.0-0 - 2
Clone the repository
Shellgit clone https://github.com/AUTOMATIC1111/stable-diffusion-webuicd stable-diffusion-webui - 3
Start it
Check webui-user.sh for options.
Shell./webui.sh
- 1
Follow the Apple Silicon guide
Instructions are on the project wiki's Installation on Apple Silicon page.
Configuration and API keys
| Setting | What it's for |
|---|---|
python_cmdOptional | Set in webui-user.sh (for example python3.11) on systems where the default Python is too new. |
First run
- 1
Start the web UI
Shell./webui.sh
stable-diffusion-webui's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Generate your first image
Install on Linux and create an image from a prompt.
Before you start
- Python 3.10 or 3.11 and git
- An NVIDIA GPU recommended
- 1
Install and start
Shellgit clone https://github.com/AUTOMATIC1111/stable-diffusion-webuicd stable-diffusion-webui./webui.sh - 2
Write a prompt
In the txt2img tab, enter a prompt and a negative prompt, then click Generate.
- 3
Refine it
Use emphasis like (tuxedo:1.21), try Highres Fix, or send the image to img2img.
What to expect
The web UI opens in your browser and generates images, saving the generation parameters inside each image.
Next steps
- Add LoRAs or embeddings
- Try inpainting
- Install extensions from the community
Costs and requirements
What it costs to run
- License
- AGPL-3.0.Free
- Software
- Free and open source.Free
- Hardware
- Runs on your own GPU.Depends
Troubleshooting
Common setup issues
Install fails on a very new Linux
Install Python 3.11 or 3.10 and set python_cmd in webui-user.sh.
Torch won't install on Windows
Use Python 3.10.6; newer versions don't support its torch.
Slow generation on supported cards
Add --xformers to the command line arguments.
Running on AMD or Intel
Follow the AMD or Intel installation guides on the wiki.
Alternatives
Similar AI repositories
ComfyUI
Comfy-Org
Node-based interface and backend for diffusion image and video workflows.
unsloth
unslothai
Local app for running and fine-tuning open language models and diffusion models on your own hardware.
InvokeAI
invoke-ai
Creative application for generating and editing images with AI models.