Scripts2026年4月14日·1 分钟阅读

Stable Diffusion Web UI by AUTOMATIC1111 — The Definitive Local AI Image Generator

AUTOMATIC1111's Stable Diffusion Web UI is the most popular interface for running Stable Diffusion locally. It supports text-to-image, image-to-image, inpainting, ControlNet, LoRA, embeddings, extensions, and every model variant — all in a self-hosted browser UI.

Introduction

AUTOMATIC1111's Stable Diffusion Web UI is the standard for running Stable Diffusion on your own GPU. With over 162,000 GitHub stars, it's the most-starred AI repository on GitHub and the platform almost every Stable Diffusion guide assumes.

The project supports SD 1.5, SD 2.x, SDXL, SD3, and dozens of community-trained variants (Anything, RealisticVision, Juggernaut, etc.). Extensions add ControlNet, AnimateDiff, Deforum (animation), inpainting tools, prompt builders, and integrations with cloud queues.

What It Does

The Web UI exposes Stable Diffusion's sampling pipelines through a tabbed browser interface: txt2img, img2img, inpainting, outpainting, training (Hypernetworks, LoRA, Textual Inversion), and a script system for batch operations. Models live in the models/ folder and can be hot-swapped from the UI dropdown.

Architecture Overview

[Browser UI (Gradio)]
      |
[Python API + WebSockets]
      |
[Sampler dispatcher]
  Euler, DPM++, UniPC,
  LMS, DDIM, ...
      |
[Stable Diffusion model]
  UNet + VAE + CLIP
  fp16/bf16 on CUDA / ROCm / MPS / CPU
      |
[Extensions]
  ControlNet, AnimateDiff,
  Deforum, ADetailer,
  Regional Prompter, etc.
      |
[Output: PNG with embedded prompt + params]

Self-Hosting & Configuration

# Common command-line flags for webui-user.sh (or .bat)
export COMMANDLINE_ARGS="--xformers \
  --listen \
  --port 7860 \
  --api \
  --no-half-vae \
  --enable-insecure-extension-access"

# Lightweight VRAM modes
# --medvram     # 8GB GPUs
# --lowvram     # 4GB GPUs
# --opt-sdp-attention   # alternative to xformers
# Programmatic API (--api flag)
import requests, base64

res = requests.post("http://127.0.0.1:7860/sdapi/v1/txt2img", json={
    "prompt": "cinematic portrait of an astronaut in a tropical garden, 35mm",
    "negative_prompt": "blurry, low quality, text, watermark",
    "steps": 30,
    "cfg_scale": 6,
    "width": 768, "height": 1024,
    "sampler_name": "DPM++ 2M Karras",
})
open("out.png", "wb").write(base64.b64decode(res.json()["images"][0]))

Key Features

  • Every SD model variant — 1.5, 2.x, SDXL, SD3, Pony, custom checkpoints
  • LoRA / Embeddings / Hypernetworks — fine-tune output with tiny add-on weights
  • Inpaint / outpaint — fix or extend any image
  • ControlNet — guide generation with poses, depth, edges, sketches
  • Extensions — install dozens of community plugins from a dropdown
  • API mode — call SD over HTTP for integrations
  • PNG metadata — every output embeds the full prompt + params
  • CUDA / ROCm / MPS / CPU — runs on NVIDIA, AMD, Apple Silicon, even CPU

Comparison with Similar Tools

Feature A1111 WebUI ComfyUI Fooocus InvokeAI SD Forge
UI style Tabbed forms Node graph Simplified prompt UI Modern dashboard A1111 fork
Beginner-friendly Yes No (steep) Very (preset workflows) Yes Yes
Power-user features Many Most Few Many Many
Performance Good Excellent Good Good Best (Forge optims)
Extensions ecosystem Largest Large (custom nodes) Limited Moderate Inherits A1111
Best For Most users Custom pipelines One-click art Polished UX Speed + A1111 plugins

FAQ

Q: A1111 vs ComfyUI? A: A1111 is form-based, beginner-friendly, with the largest extension ecosystem. ComfyUI is node-based, ideal for repeatable advanced pipelines. Many practitioners use both.

Q: Is A1111 still actively maintained? A: Slower development since 2024, but still receiving updates. Many users have migrated to forks like SD.Next or Forge for newer model support. For most existing setups, A1111 still works fine.

Q: Minimum hardware? A: 4GB VRAM with --lowvram for SD 1.5; 6–8GB recommended; 12GB+ for SDXL comfortably. Apple Silicon works (MPS backend) but slower than CUDA.

Q: Where do I get models? A: Civitai for community-trained checkpoints/LoRA. Hugging Face for official models (RunwayML SD 1.5, Stability SDXL/SD3). Place .safetensors files in models/Stable-diffusion/.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产