Overview

Stable Diffusion is the leading open-source image generation model. Run it locally for unlimited generations with full control over models and settings.

Option 1: Automatic1111 WebUI

The most popular interface with extensive features.

# Clone repository
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui

# Run (auto-installs dependencies)
./webui.sh  # Linux/Mac
webui-user.bat  # Windows

Access at http://localhost:7860

Option 2: ComfyUI

Node-based interface for advanced workflows.

git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install -r requirements.txt
python main.py

Option 3: Python with Diffusers

from diffusers import StableDiffusionPipeline
import torch

pipe = StableDiffusionPipeline.from_pretrained(
    "stabilityai/stable-diffusion-xl-base-1.0",
    torch_dtype=torch.float16
).to("cuda")

image = pipe(
    prompt="A serene mountain landscape at sunset, photorealistic",
    negative_prompt="blurry, low quality",
    num_inference_steps=30,
    guidance_scale=7.5
).images[0]

image.save("output.png")
ModelSizeBest For
SDXL 1.06.5 GBHigh quality, general
SD 1.54 GBFast, many fine-tunes
Juggernaut XL6.5 GBPhotorealistic
DreamShaper4 GBArtistic styles

Hardware Requirements

ModelMin VRAMRecommended
SD 1.54 GB8 GB
SDXL8 GB12 GB
SDXL + LoRA10 GB16 GB

Tips for Better Results

  1. Negative prompts: Always use them
  2. CFG scale: 7-9 for most cases
  3. Steps: 20-30 is usually enough
  4. Seed: Fix seed for reproducibility
  5. LoRAs: Add style/character consistency

Key Resources