4
SD Pipeline How it Works
Vladimir Mandic edited this page 2026-05-13 12:33:44 +02:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Stable Diffusion Pipeline

For comprehensive explanations, see:

Pipeline Steps

  1. Encoder / Conditioning — Convert text (via tokenizer) or images (via vision model) into semantic maps (e.g., CLIP text encoder)

  2. Sampler — Generate starting noise as the basis for content generation (e.g., K-LMS)

  3. Diffuser — Create vector content from noise and semantic map (e.g., Stable Diffusion checkpoint)

  4. Autoencoder — Map between latent and pixel space to generate actual images (e.g., VAE)

  5. Denoising — Refine pixel output using diffuser information and blend results (e.g., U-NET)

  6. Iterative Refinement — Repeat steps 35 with cross-attention to progressively blend and improve results

  7. Optional Post-Processing — Apply additional models as needed (e.g., ESRGAN for upscaling)