# AI use cases for Stable Diffusion WebUI (AUTOMATIC1111/stable-diffusion-webui)

Repo: [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | Use cases: 3 | Page: https://dedupedai.com/use-cases/automatic1111-stable-diffusion-webui/

Stable Diffusion web UI is a browser interface for Stable Diffusion built with Gradio. It covers txt2img and img2img, inpainting, outpainting, upscaling, prompt attention syntax, X/Y/Z plots and a one click install and run script.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Install the web UI on Linux with one script: https://dedupedai.com/use-cases/automatic1111-stable-diffusion-webui/install-stable-diffusion-webui-on-linux/
- Compare settings side by side with X/Y/Z plot: https://dedupedai.com/use-cases/automatic1111-stable-diffusion-webui/compare-prompt-and-setting-variations-with-xyz-plot/
- Speed up generation with xformers: https://dedupedai.com/use-cases/automatic1111-stable-diffusion-webui/speed-up-stable-diffusion-webui-with-xformers/

## How to install the web UI on Linux with one script with Stable Diffusion WebUI

Repo: [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Install the system packages, download webui.sh and run it to set up and launch the web UI.

**Who it is for:** A Linux user with a GPU who wants local image generation.

**The problem:** Setting up Python environments and models by hand is error prone.

**The outcome:** The web UI running in your browser, ready for txt2img.

### Steps

1. Install dependencies, for example `sudo apt install wget git python3 python3-venv libgl1 libglib2.0-0` on Debian based systems
2. Download the script with `wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh`
3. Or clone with `git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui`
4. Run `webui.sh` and open the local URL it prints
5. Check `webui-user.sh` for options

### Prompt to paste into your agent

```text
Using AUTOMATIC1111/stable-diffusion-webui, install the Debian dependencies from the README, run `git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui`, run `webui.sh`, and confirm txt2img works with <my model>.
```

### Caveat

Apple Silicon has its own install guide on the project wiki.

Risk, download: First launch installs PyTorch and other packages, several gigabytes.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/automatic1111-stable-diffusion-webui/install-stable-diffusion-webui-on-linux/

## How to compare settings side by side with X/Y/Z plot with Stable Diffusion WebUI

Repo: [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | Difficulty: Beginner | Time: 20 minutes | Basis: From the README

Use the X/Y/Z plot feature to render a grid of images across samplers, steps or CFG values.

**Who it is for:** An artist tuning settings for a consistent style.

**The problem:** Changing one setting at a time and comparing by eye is slow.

**The outcome:** One grid image showing how each setting changes the result.

### Steps

1. Install with `wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh` and run `webui.sh`
2. Write your prompt in txt2img
3. Choose the X/Y/Z plot script and set the values for each axis
4. Generate and compare the grid

### Prompt to paste into your agent

```text
With AUTOMATIC1111/stable-diffusion-webui running, use the X/Y/Z plot script to compare three samplers against steps 20, 30 and 40 for <my prompt>, and tell me which combination looks best.
```

### Caveat

Large grids take a long time on small GPUs; start with few values per axis.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/automatic1111-stable-diffusion-webui/compare-prompt-and-setting-variations-with-xyz-plot/

## How to speed up generation with xformers with Stable Diffusion WebUI

Repo: [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Add the --xformers command line argument in webui-user.sh for a major speed increase on supported cards.

**Who it is for:** Users with NVIDIA cards who find generation slow.

**The problem:** Default settings leave speed on the table on many GPUs.

**The outcome:** Faster image generation on cards that support xformers.

### Steps

1. Install with `git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui`
2. Open `webui-user.sh` and add `--xformers` to the command line arguments
3. Restart with `webui.sh`
4. Time the same prompt before and after

### Prompt to paste into your agent

```text
In my AUTOMATIC1111/stable-diffusion-webui install, add `--xformers` to the command line arguments in webui-user.sh, restart with webui.sh, and compare generation time on <my prompt>.
```

### Caveat

xformers helps only on select cards; see the project wiki.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/automatic1111-stable-diffusion-webui/speed-up-stable-diffusion-webui-with-xformers/
