# Stable Diffusion web UI (AUTOMATIC1111)

> A browser interface for running Stable Diffusion image generation on your own machine

- Category: Multimodal Generation / Image Generation
- Language: Python
- Licence: AGPL-3.0
- Repository: https://github.com/AUTOMATIC1111/stable-diffusion-webui
- Canonical page: https://ai-tldr.dev/tools/stable-diffusion-web-ui-automatic1111/

## In short

Stable Diffusion web UI (AUTOMATIC1111) is a browser interface for running Stable Diffusion image generation on your own machine. Instead of writing code, you type prompts and adjust settings in a web page that runs locally, then generate images on your own GPU. It sits in the Image Generation category of the Multimodal Generation tools and is open-source, written in Python and licensed AGPL-3.0.

## Overview

Stable Diffusion web UI is a browser interface for running Stable Diffusion models on your own hardware, built by AUTOMATIC1111 using the Gradio library. Instead of writing code, you type prompts and adjust settings in a web page that runs locally, then generate images on your own GPU.

It is aimed at people who want hands-on control over image generation: artists, hobbyists, and developers who prefer to run models locally rather than through a hosted service. The interface covers text-to-image and image-to-image generation, inpainting, outpainting, and upscaling, and supports add-ons like LoRA, textual inversion embeddings, and hypernetworks.

As an image-generation tool in the multimodal space, it acts as a front end for Stable Diffusion checkpoints you supply. It also exposes an API so you can drive generation from other programs, and supports community extensions and custom scripts for extra features.

## What it does

- Text-to-image (txt2img) and image-to-image (img2img) generation, plus inpainting and outpainting
- Prompt controls including negative prompts, attention weighting, styles, and prompt editing mid-generation
- Built-in upscalers (RealESRGAN, ESRGAN, SwinIR, LDSR) and face restoration with GFPGAN and CodeFormer
- Support for LoRAs, textual inversion embeddings, hypernetworks, and loading checkpoints in safetensors format
- Highres Fix, X/Y/Z plots, checkpoint merging, and a training tab for embeddings and hypernetworks
- An API for programmatic access and community extensions and custom scripts

## Getting started

You need Python 3.10.6 and git installed first; newer Python versions are not supported. The repo ships launch scripts that set up a virtual environment and download dependencies on first run.

1. Install prerequisites

   Install Python 3.10.6 (on Windows, check "Add Python to PATH") and git. On Debian-based Linux, install the system packages first.

```bash
sudo apt install wget git python3 python3-venv libgl1 libglib2.0-0
```

2. Clone the repository

   Download the project source with git.

```bash
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
```

3. Run the web UI

   On Windows, run webui-user.bat as a normal (non-administrator) user. On Linux, run webui.sh. The first run creates a virtual environment and downloads dependencies, then prints a local URL to open in your browser.

```bash
./webui.sh
```

## When to use it

- Generate images from text prompts locally on your own GPU without sending data to a hosted service
- Edit and extend existing images with inpainting, outpainting, and image-to-image
- Upscale and restore faces in generated or existing images using the built-in upscalers
- Experiment with custom checkpoints, LoRAs, and embeddings, or drive generation through the API
