Docs / AI & Machine Learning / Automatic1111 Forge for Image Generation

Automatic1111 Forge for Image Generation

By Admin · Mar 15, 2026 · Updated Apr 23, 2026 · 548 views · 2 min read

What is WebUI Forge?

Stable Diffusion WebUI Forge is an optimized fork of Automatic1111 WebUI that provides faster generation, lower VRAM usage, and better compatibility with modern Stable Diffusion models including SDXL and SD3.

Installation

# Install dependencies
sudo apt install -y python3-venv git libgl1 libglib2.0-0

# Clone Forge
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git /opt/sd-forge
cd /opt/sd-forge

# Run setup (downloads dependencies automatically)
python3 -m venv venv
source venv/bin/activate
bash webui.sh --listen --api --xformers

Download Models

# Place models in models/Stable-diffusion/
# SDXL Base: models/Stable-diffusion/sd_xl_base_1.0.safetensors
# Download from huggingface.co or civitai.com

# LoRA models: models/Lora/
# VAE models: models/VAE/
# ControlNet: models/ControlNet/

API Usage

# Generate image via API
curl -X POST http://localhost:7860/sdapi/v1/txt2img \
    -H "Content-Type: application/json" \
    -d '{
        "prompt": "a beautiful landscape painting",
        "negative_prompt": "blurry, bad quality",
        "steps": 30,
        "width": 1024,
        "height": 1024,
        "cfg_scale": 7
    }'

Systemd Service

cat > /etc/systemd/system/sd-forge.service << EOF
[Unit]
Description=Stable Diffusion WebUI Forge
After=network.target
[Service]
User=sduser
WorkingDirectory=/opt/sd-forge
ExecStart=/opt/sd-forge/venv/bin/python launch.py --listen --api --xformers
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl enable --now sd-forge

Features

  • Text-to-image and image-to-image generation
  • Inpainting and outpainting
  • ControlNet for guided generation
  • LoRA and textual inversion support
  • Upscaling with various algorithms
  • Extensions ecosystem for additional features

Was this article helpful?