Skip to content
AIRepoHub

stable-diffusion-webui

by AUTOMATIC1111

Browser interface for running Stable Diffusion image generation locally.

Image GenerationPythonAGPL-3.0 licenseApp
Stars
165,373
stars
Forks
31k
forks
Last push
8 months ago
Activity
Slowing down
stable-diffusion-webui: quick start
# Clone the repository$ git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui# Start it on Linux$ ./webui.sh

Commands 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

Based on official documentation

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. 1

    Download sd.webui.zip

    From the v1.0.0-pre release, then extract it.

  2. 2

    Update

    Run update.bat.

  3. 3

    Start

    Run run.bat.

  1. 1

    Install Python 3.10.6 and git

    Tick Add Python to PATH. Newer Python versions don't support torch here.

  2. 2

    Clone the repository

    PowerShell
    git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
  3. 3

    Start it

    Run webui-user.bat from Windows Explorer as a normal, non-administrator user.

Configuration and API keys

SettingWhat it's for
python_cmdOptionalSet in webui-user.sh (for example python3.11) on systems where the default Python is too new.

First run

  1. 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. 1

    Install and start

    Shell
    git clone https://github.com/AUTOMATIC1111/stable-diffusion-webuicd stable-diffusion-webui./webui.sh
  2. 2

    Write a prompt

    In the txt2img tab, enter a prompt and a negative prompt, then click Generate.

  3. 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.

Source: README.md

Torch won't install on Windows

Use Python 3.10.6; newer versions don't support its torch.

Source: README.md

Slow generation on supported cards

Add --xformers to the command line arguments.

Source: README.md

Running on AMD or Intel

Follow the AMD or Intel installation guides on the wiki.

Source: README.md

Alternatives

Similar AI repositories