Home›
Knowledge Base›
are the generative method behind most modern image, video, and audio synthesis — Stable Diffusion, DALL-E, Midjourney, Sora and their kin. The core idea is almost paradoxically simple: take a clean image and gradually destroy it with random noise until nothing is left, then train a neural network to reverse that process one small step at a time. Once the network knows how to remove a little noise, you can start from pure static and, step by step, denoise your way to a brand-new image that never existed. Diffusion has largely displaced GANs for high-fidelity generation because it is far more stable to train and covers the diversity of the data better.\n\n```svg\n\n \n Diffusion Models — Learn to Undo Noise\n destroy an image with noise on a schedule, then train a network to reverse each step\n \n \n \n \n \n \n \n \n \n x₀\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n x₁\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n x₂\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n x₃\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n xₜ\n image\n Gaussian noise\n \n \n FORWARD — add a little noise at each step (fixed, no learning)\n \n \n REVERSE — a network removes the noise step by step (this is what is learned)\n \n U-Net / DiT denoiser — predicts the noise ε to subtract\n loss = || ε − εθ(xₜ, t, prompt) ||²\n \n \n text prompt\n guides sampling\n \n \n \n latent space\n VAE-compressed\n\n```\n\n
<svg viewBox="0 0 760 470" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,Segoe UI,Roboto,sans-serif">
<rect x="0" y="0" width="760" height="470" fill="#0d1117"/>
<text x="380" y="28" fill="#e6edf3" font-size="21" font-weight="700" text-anchor="middle">Diffusion Models — Denoise to Generate</text>
<text x="380" y="48" fill="#8b98a5" font-size="12" text-anchor="middle">add noise step by step (forward), then learn to reverse it (backward) — generate images from pure noise</text>
<!-- === TOP: Forward and reverse process === -->
<rect x="25" y="62" width="710" height="125" rx="6" fill="#080d14" stroke="#233043" stroke-width="1.2"/>
<text x="380" y="80" fill="#e6edf3" font-size="11" text-anchor="middle" font-weight="600">The Diffusion Process</text>
<!-- Forward: clean → noisy -->
<text x="45" y="100" fill="#60a5fa" font-size="9" font-weight="600">Forward (add noise, fixed): q(x_t | x_{t-1})</text>
<rect x="50" y="108" width="40" height="30" rx="3" fill="#14261f" stroke="#34d399" stroke-width="0.7"/>
<text x="70" y="126" fill="#6ee7b7" font-size="7" text-anchor="middle">x₀</text>
<path d="M93,123 L110,123" fill="none" stroke="#8b98a5" stroke-width="0.6"/>
<rect x="113" y="108" width="40" height="30" rx="3" fill="#14261f" stroke="#34d399" stroke-width="0.5" opacity="0.8"/>
<text x="133" y="126" fill="#8b98a5" font-size="7" text-anchor="middle">x₁</text>
<path d="M156,123 L173,123" fill="none" stroke="#8b98a5" stroke-width="0.6"/>
<rect x="176" y="108" width="40" height="30" rx="3" fill="#0b1220" stroke="#233043" stroke-width="0.5" opacity="0.6"/>
<text x="196" y="126" fill="#8b98a5" font-size="7" text-anchor="middle">x_t</text>
<path d="M219,123 L236,123" fill="none" stroke="#8b98a5" stroke-width="0.6"/>
<text x="250" y="126" fill="#6b7684" font-size="8">...</text>
<path d="M262,123 L279,123" fill="none" stroke="#8b98a5" stroke-width="0.6"/>
<rect x="282" y="108" width="40" height="30" rx="3" fill="#1a0f0f" stroke="#f87171" stroke-width="0.7"/>
<text x="302" y="126" fill="#f87171" font-size="7" text-anchor="middle">x_T</text>
<text x="340" y="126" fill="#f87171" font-size="8">≈ N(0,1) pure noise</text>
<!-- Reverse: noisy → clean -->
<text x="45" y="155" fill="#34d399" font-size="9" font-weight="600">Reverse (denoise, learned): p_θ(x_{t-1} | x_t)</text>
<rect x="282" y="162" width="40" height="30" rx="3" fill="#1a0f0f" stroke="#f87171" stroke-width="0.7"/>
<text x="302" y="180" fill="#f87171" font-size="7" text-anchor="middle">x_T</text>
<path d="M279,177 L262,177" fill="none" stroke="#34d399" stroke-width="0.6"/>
<text x="250" y="180" fill="#6b7684" font-size="8">...</text>
<path d="M236,177 L219,177" fill="none" stroke="#34d399" stroke-width="0.6"/>
<rect x="176" y="162" width="40" height="30" rx="3" fill="#0b1220" stroke="#233043" stroke-width="0.5"/>
<text x="196" y="180" fill="#8b98a5" font-size="7" text-anchor="middle">x_t</text>
<path d="M173,177 L156,177" fill="none" stroke="#34d399" stroke-width="0.6"/>
<rect x="113" y="162" width="40" height="30" rx="3" fill="#14261f" stroke="#34d399" stroke-width="0.5"/>
<text x="133" y="180" fill="#8b98a5" font-size="7" text-anchor="middle">x₁</text>
<path d="M110,177 L93,177" fill="none" stroke="#34d399" stroke-width="0.6"/>
<rect x="50" y="162" width="40" height="30" rx="3" fill="#14261f" stroke="#34d399" stroke-width="0.8"/>
<text x="70" y="180" fill="#6ee7b7" font-size="7" text-anchor="middle">x₀ ✓</text>
<text x="340" y="180" fill="#34d399" font-size="8">← U-Net predicts noise ε_θ(x_t, t)</text>
<!-- Conditioning -->
<rect x="480" y="100" width="230" height="78" rx="4" fill="#0b1220" stroke="#233043" stroke-width="0.8"/>
<text x="595" y="118" fill="#fbbf24" font-size="9" text-anchor="middle" font-weight="600">Text conditioning</text>
<text x="495" y="136" fill="#8b98a5" font-size="8">"a cat in a spacesuit"</text>
<text x="495" y="152" fill="#8b98a5" font-size="8">→ CLIP text encoder → embeddings</text>
<text x="495" y="168" fill="#8b98a5" font-size="8">→ cross-attention in U-Net</text>
<!-- === MIDDLE LEFT: Architecture === -->
<rect x="25" y="195" width="350" height="115" rx="6" fill="#0b1220" stroke="#233043" stroke-width="1"/>
<text x="200" y="213" fill="#e6edf3" font-size="10" text-anchor="middle" font-weight="600">Architecture Evolution</text>
<text x="45" y="233" fill="#60a5fa" font-size="8.5" font-weight="600">DDPM (2020)</text>
<text x="135" y="233" fill="#8b98a5" font-size="8.5">pixel-space, 1000 steps, slow</text>
<text x="45" y="249" fill="#34d399" font-size="8.5" font-weight="600">LDM / Stable Diffusion</text>
<text x="190" y="249" fill="#8b98a5" font-size="8.5">latent space (64×64), VAE encode</text>
<text x="45" y="265" fill="#fbbf24" font-size="8.5" font-weight="600">DiT (Diffusion Transformer)</text>
<text x="205" y="265" fill="#8b98a5" font-size="8.5">replace U-Net with transformer</text>
<text x="45" y="281" fill="#c4b5fd" font-size="8.5" font-weight="600">Flow matching (SD3, Flux)</text>
<text x="195" y="281" fill="#8b98a5" font-size="8.5">straighter paths, fewer steps</text>
<text x="45" y="297" fill="#f87171" font-size="8.5" font-weight="600">Consistency models</text>
<text x="170" y="297" fill="#8b98a5" font-size="8.5">1-4 step generation (distilled)</text>
<!-- === MIDDLE RIGHT: Key concepts === -->
<rect x="390" y="195" width="345" height="115" rx="6" fill="#0b1220" stroke="#233043" stroke-width="1"/>
<text x="562" y="213" fill="#e6edf3" font-size="10" text-anchor="middle" font-weight="600">Key Concepts</text>
<text x="410" y="233" fill="#60a5fa" font-size="8.5" font-weight="600">Classifier-free guidance (CFG)</text>
<text x="410" y="249" fill="#8b98a5" font-size="8.5">blend conditional + unconditional (scale 7-12)</text>
<text x="410" y="267" fill="#34d399" font-size="8.5" font-weight="600">Scheduler (sampler)</text>
<text x="410" y="283" fill="#8b98a5" font-size="8.5">DDIM, Euler, DPM++ (20-50 steps typical)</text>
<text x="410" y="301" fill="#fbbf24" font-size="8.5" font-weight="600">ControlNet / IP-Adapter</text>
<text x="410" y="313" fill="#8b98a5" font-size="8.5">add pose, depth, edge conditioning</text>
<!-- === BOTTOM: Models === -->
<rect x="25" y="320" width="710" height="82" rx="5" fill="#0b1220" stroke="#233043" stroke-width="1"/>
<text x="380" y="338" fill="#e6edf3" font-size="10" text-anchor="middle" font-weight="600">Production Models</text>
<text x="85" y="360" fill="#c4b5fd" font-size="9.5" text-anchor="middle" font-weight="600">DALL-E 3</text>
<text x="85" y="374" fill="#8b98a5" font-size="8" text-anchor="middle">OpenAI, caption rewrite</text>
<text x="215" y="360" fill="#fbbf24" font-size="9.5" text-anchor="middle" font-weight="600">Midjourney v6</text>
<text x="215" y="374" fill="#8b98a5" font-size="8" text-anchor="middle">aesthetic, proprietary</text>
<text x="345" y="360" fill="#34d399" font-size="9.5" text-anchor="middle" font-weight="600">Flux.1 (BFL)</text>
<text x="345" y="374" fill="#8b98a5" font-size="8" text-anchor="middle">DiT + flow, open weights</text>
<text x="475" y="360" fill="#60a5fa" font-size="9.5" text-anchor="middle" font-weight="600">Stable Diffusion 3</text>
<text x="475" y="374" fill="#8b98a5" font-size="8" text-anchor="middle">MMDiT, flow matching</text>
<text x="620" y="360" fill="#f87171" font-size="9.5" text-anchor="middle" font-weight="600">Imagen 3</text>
<text x="620" y="374" fill="#8b98a5" font-size="8" text-anchor="middle">Google, text fidelity</text>
<text x="380" y="396" fill="#6b7684" font-size="8" text-anchor="middle">Video: Sora (OpenAI), Kling (Kuaishou), Gen-3 (Runway) — diffusion transformers scaled to spatiotemporal</text>
<!-- Key insight -->
<rect x="25" y="410" width="710" height="22" rx="3" fill="#0b1220" stroke="#233043" stroke-width="0.8"/>
<text x="380" y="425" fill="#fbbf24" font-size="9" text-anchor="middle">Diffusion works because denoising is easier than generating from scratch — break one hard step into many easy ones.</text>
<text x="380" y="460" fill="#6b7684" font-size="11" text-anchor="middle">Diffusion models turned image generation from a research curiosity into a production tool — all in 3 years (2020-2023).</text>
</svg>
```ffusion models** are the generative method behind most modern image, video, and audio synthesis — Stable Diffusion, DALL-E, Midjourney, Sora and their kin. The core idea is almost paradoxically simple: take a clean image and gradually destroy it with random noise until nothing is left, then train a neural network to reverse that process one small step at a time. Once the network knows how to remove a little noise, you can start from pure static and, step by step, denoise your way to a brand-new image that never existed. Diffusion has largely displaced GANs for high-fidelity generation because it is far more stable to train and covers the diversity of the data better.\n\n```svg\n<svg viewBox="0 0 760 400" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,Segoe UI,Roboto,sans-serif">\n <rect x="0" y="0" width="760" height="400" fill="#0d1117"/>\n <text x="380" y="30" fill="#e6edf3" font-size="21" font-weight="700" text-anchor="middle">Diffusion Models — Learn to Undo Noise</text>\n <text x="380" y="52" fill="#8b98a5" font-size="12.5" text-anchor="middle">destroy an image with noise on a schedule, then train a network to reverse each step</text>\n <rect x="70" y="150" width="90" height="90" rx="6" fill="#0b1220" stroke="#3f5169" stroke-width="1.3"/>\n <circle cx="115.0" cy="195.0" r="20" fill="none" stroke="#60a5fa" stroke-width="2.4" opacity="1.00"/>\n <circle cx="115.0" cy="195.0" r="8" fill="#60a5fa" opacity="1.00"/>\n <circle cx="101" cy="166" r="1.1" fill="#c9d4e0" opacity="0.15"/>\n <circle cx="78" cy="221" r="1.1" fill="#e6edf3" opacity="0.15"/>\n <circle cx="104" cy="159" r="1.1" fill="#c9d4e0" opacity="0.15"/>\n <circle cx="92" cy="161" r="1.1" fill="#8b98a5" opacity="0.15"/>\n <circle cx="80" cy="161" r="1.1" fill="#8b98a5" opacity="0.15"/>\n <circle cx="79" cy="200" r="1.1" fill="#e6edf3" opacity="0.15"/>\n <text x="115.0" y="256" fill="#8b98a5" font-size="13" text-anchor="middle">x₀</text>\n <rect x="215" y="150" width="90" height="90" rx="6" fill="#0b1220" stroke="#3f5169" stroke-width="1.3"/>\n <circle cx="260.0" cy="195.0" r="20" fill="none" stroke="#60a5fa" stroke-width="2.4" opacity="0.78"/>\n <circle cx="260.0" cy="195.0" r="8" fill="#60a5fa" opacity="0.78"/>\n <circle cx="271" cy="202" r="1.1" fill="#e6edf3" opacity="0.30"/>\n <circle cx="266" cy="187" r="1.1" fill="#e6edf3" opacity="0.30"/>\n <circle cx="223" cy="224" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <circle cx="253" cy="198" r="1.1" fill="#c9d4e0" opacity="0.30"/>\n <circle cx="244" cy="221" r="1.1" fill="#e6edf3" opacity="0.30"/>\n <circle cx="227" cy="201" r="1.1" fill="#e6edf3" opacity="0.30"/>\n <circle cx="250" cy="199" r="1.1" fill="#e6edf3" opacity="0.30"/>\n <circle cx="265" cy="205" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <circle cx="275" cy="189" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <circle cx="257" cy="230" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <circle cx="244" cy="219" r="1.1" fill="#c9d4e0" opacity="0.30"/>\n <circle cx="283" cy="161" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <circle cx="262" cy="226" r="1.1" fill="#c9d4e0" opacity="0.30"/>\n <circle cx="256" cy="204" r="1.1" fill="#e6edf3" opacity="0.30"/>\n <circle cx="229" cy="188" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <circle cx="231" cy="194" r="1.1" fill="#e6edf3" opacity="0.30"/>\n <circle cx="298" cy="160" r="1.1" fill="#c9d4e0" opacity="0.30"/>\n <circle cx="266" cy="226" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <circle cx="247" cy="183" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <circle cx="267" cy="191" r="1.1" fill="#e6edf3" opacity="0.30"/>\n <circle cx="296" cy="193" r="1.1" fill="#c9d4e0" opacity="0.30"/>\n <circle cx="224" cy="214" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <circle cx="272" cy="235" r="1.1" fill="#8b98a5" opacity="0.30"/>\n <text x="260.0" y="256" fill="#8b98a5" font-size="13" text-anchor="middle">x₁</text>\n <rect x="360" y="150" width="90" height="90" rx="6" fill="#0b1220" stroke="#3f5169" stroke-width="1.3"/>\n <circle cx="405.0" cy="195.0" r="20" fill="none" stroke="#60a5fa" stroke-width="2.4" opacity="0.55"/>\n <circle cx="405.0" cy="195.0" r="8" fill="#60a5fa" opacity="0.55"/>\n <circle cx="387" cy="186" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="392" cy="231" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="378" cy="164" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="382" cy="178" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="384" cy="186" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="371" cy="191" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="387" cy="165" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="435" cy="177" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="445" cy="210" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="443" cy="166" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="376" cy="208" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="404" cy="202" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="387" cy="166" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="394" cy="200" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="421" cy="196" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="418" cy="215" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="438" cy="218" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="429" cy="186" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="396" cy="193" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="369" cy="160" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="400" cy="163" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="368" cy="154" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="408" cy="232" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="366" cy="226" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="395" cy="206" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="413" cy="193" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="434" cy="235" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="403" cy="180" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="372" cy="182" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="403" cy="211" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="366" cy="232" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="394" cy="211" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="426" cy="178" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="435" cy="211" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="407" cy="228" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="427" cy="198" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="391" cy="172" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="430" cy="221" r="1.1" fill="#c9d4e0" opacity="0.45"/>\n <circle cx="430" cy="170" r="1.1" fill="#8b98a5" opacity="0.45"/>\n <circle cx="393" cy="156" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <circle cx="429" cy="193" r="1.1" fill="#e6edf3" opacity="0.45"/>\n <text x="405.0" y="256" fill="#8b98a5" font-size="13" text-anchor="middle">x₂</text>\n <rect x="505" y="150" width="90" height="90" rx="6" fill="#0b1220" stroke="#3f5169" stroke-width="1.3"/>\n <circle cx="550.0" cy="195.0" r="20" fill="none" stroke="#60a5fa" stroke-width="2.4" opacity="0.32"/>\n <circle cx="550.0" cy="195.0" r="8" fill="#60a5fa" opacity="0.32"/>\n <circle cx="566" cy="232" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="575" cy="213" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="587" cy="184" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="517" cy="193" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="526" cy="205" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="578" cy="193" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="537" cy="207" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="519" cy="186" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="571" cy="193" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="545" cy="206" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="575" cy="234" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="547" cy="215" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="568" cy="168" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="511" cy="202" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="575" cy="166" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="589" cy="208" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="522" cy="199" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="510" cy="234" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="517" cy="215" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="545" cy="225" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="511" cy="171" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="529" cy="202" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="554" cy="222" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="584" cy="183" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="563" cy="221" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="543" cy="229" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="520" cy="166" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="511" cy="190" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="559" cy="218" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="523" cy="193" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="519" cy="159" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="552" cy="200" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="581" cy="159" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="532" cy="217" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="546" cy="156" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="545" cy="204" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="559" cy="170" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="546" cy="198" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="551" cy="174" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="581" cy="231" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="585" cy="227" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="578" cy="165" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="541" cy="180" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="529" cy="160" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="534" cy="164" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="586" cy="207" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="521" cy="226" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="527" cy="232" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="582" cy="167" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="577" cy="167" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="591" cy="187" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="525" cy="180" r="1.1" fill="#c9d4e0" opacity="0.60"/>\n <circle cx="539" cy="182" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="545" cy="155" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="551" cy="178" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="518" cy="229" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <circle cx="589" cy="163" r="1.1" fill="#8b98a5" opacity="0.60"/>\n <circle cx="531" cy="228" r="1.1" fill="#e6edf3" opacity="0.60"/>\n <text x="550.0" y="256" fill="#8b98a5" font-size="13" text-anchor="middle">x₃</text>\n <rect x="650" y="150" width="90" height="90" rx="6" fill="#0b1220" stroke="#3f5169" stroke-width="1.3"/>\n <circle cx="695.0" cy="195.0" r="20" fill="none" stroke="#60a5fa" stroke-width="2.4" opacity="0.10"/>\n <circle cx="695.0" cy="195.0" r="8" fill="#60a5fa" opacity="0.10"/>\n <circle cx="676" cy="165" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="724" cy="209" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="687" cy="198" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="701" cy="211" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="677" cy="220" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="689" cy="160" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="706" cy="220" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="704" cy="172" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="725" cy="191" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="736" cy="188" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="705" cy="158" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="674" cy="163" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="675" cy="169" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="706" cy="198" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="678" cy="195" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="676" cy="220" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="657" cy="156" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="699" cy="170" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="674" cy="191" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="721" cy="189" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="699" cy="227" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="679" cy="172" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="682" cy="222" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="714" cy="165" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="735" cy="223" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="660" cy="215" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="689" cy="159" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="723" cy="225" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="734" cy="203" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="678" cy="192" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="676" cy="154" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="733" cy="234" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="681" cy="157" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="672" cy="169" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="685" cy="193" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="708" cy="174" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="661" cy="221" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="687" cy="157" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="679" cy="206" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="702" cy="197" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="708" cy="213" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="686" cy="181" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="666" cy="213" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="666" cy="222" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="727" cy="205" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="711" cy="195" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="716" cy="201" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="722" cy="202" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="710" cy="211" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="661" cy="157" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="684" cy="163" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="700" cy="205" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="698" cy="174" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="654" cy="219" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="730" cy="228" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="708" cy="159" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="693" cy="220" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="673" cy="216" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="715" cy="234" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="723" cy="160" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="678" cy="158" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="707" cy="160" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="681" cy="207" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="679" cy="201" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="694" cy="194" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="662" cy="172" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="678" cy="196" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="692" cy="217" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="670" cy="234" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="655" cy="192" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="733" cy="191" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="686" cy="229" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="660" cy="161" r="1.1" fill="#c9d4e0" opacity="0.75"/>\n <circle cx="697" cy="232" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <circle cx="703" cy="206" r="1.1" fill="#8b98a5" opacity="0.75"/>\n <circle cx="727" cy="212" r="1.1" fill="#e6edf3" opacity="0.75"/>\n <text x="695.0" y="256" fill="#8b98a5" font-size="13" text-anchor="middle">xₜ</text>\n <text x="115.0" y="140" fill="#6ee7b7" font-size="12" text-anchor="middle">image</text>\n <text x="695.0" y="140" fill="#c9d4e0" font-size="12" text-anchor="middle">Gaussian noise</text>\n <line x1="70" y1="120" x2="690" y2="120" stroke="#34d399" stroke-width="2"/>\n <path d="M682 124 L690 120 L682 116" stroke="#34d399" stroke-width="2" fill="none"/>\n <text x="380" y="112" fill="#6ee7b7" font-size="12.5" font-weight="700" text-anchor="middle">FORWARD — add a little noise at each step (fixed, no learning)</text>\n <line x1="690" y1="282" x2="70" y2="282" stroke="#fbbf24" stroke-width="2"/>\n <path d="M78 278 L70 282 L78 286" stroke="#fbbf24" stroke-width="2" fill="none"/>\n <text x="380" y="300" fill="#fcd34d" font-size="12.5" font-weight="700" text-anchor="middle">REVERSE — a network removes the noise step by step (this is what is learned)</text>\n <rect x="150" y="326" width="460" height="60" rx="8" fill="#141a2e" stroke="#818cf8" stroke-width="1.6"/>\n <text x="380" y="349" fill="#a5b4fc" font-size="12.5" font-weight="700" text-anchor="middle">U-Net / DiT denoiser — predicts the noise ε to subtract</text>\n <text x="380" y="369" fill="#93c5fd" font-size="12" text-anchor="middle" font-family="ui-monospace,monospace">loss = || ε − εθ(xₜ, t, prompt) ||²</text>\n <rect x="150" y="324" width="0" height="0"/>\n <rect x="628" y="332" width="120" height="48" rx="6" fill="#2a1420" stroke="#fbbf24" stroke-width="1.2"/>\n <text x="688" y="352" fill="#fcd34d" font-size="12" text-anchor="middle">text prompt</text>\n <text x="688" y="368" fill="#8b98a5" font-size="12" text-anchor="middle">guides sampling</text>\n <line x1="628" y1="356" x2="610" y2="356" stroke="#3f5169" stroke-width="1.4"/>\n <path d="M618 352 L610 356 L618 360" stroke="#3f5169" stroke-width="1.4" fill="none"/>\n <rect x="12" y="332" width="120" height="48" rx="6" fill="#0f1c17" stroke="#34d399" stroke-width="1.2"/>\n <text x="72" y="352" fill="#6ee7b7" font-size="12" text-anchor="middle">latent space</text>\n <text x="72" y="368" fill="#8b98a5" font-size="12" text-anchor="middle">VAE-compressed</text>\n</svg>\n```\n\n**The forward process just adds noise, and it has no parameters.** A fixed schedule corrupts a real image over many timesteps, adding a small amount of Gaussian noise at each one until the final step is indistinguishable from pure static. There is nothing to learn here — it is a mathematically defined destruction. Its only purpose is to manufacture training pairs: at every noise level, the model gets to see "here is the noisy version, here is the noise that was added."\n\n**The reverse process is the model, and it is what you train.** A neural network learns to look at a noisy image and predict the noise that should be removed to make it slightly cleaner. The training objective is strikingly plain — a mean-squared error between the true added noise and the network's predicted noise. Do this well at every noise level and the network has implicitly learned the structure of the entire data distribution.\n\n**Generation is iterative denoising from scratch.** To create a new image, you sample pure random noise and run the reverse network repeatedly, each pass stripping away a bit more noise, until a coherent image emerges. This is why diffusion sampling is slower than a single forward pass of a GAN — it takes many steps. Much recent research (DDIM, distillation, consistency and flow-matching models) is about cutting the number of steps from hundreds down to a handful without losing quality.\n\n**Conditioning is how you control the output.** Text-to-image models feed a prompt embedding into the denoiser so that every denoising step is nudged toward images matching the text. Classifier-free guidance amplifies this by contrasting the conditioned and unconditioned predictions, trading some diversity for much stronger prompt adherence — the guidance scale knob users tune. The same conditioning mechanism handles inpainting, image-to-image, and control signals.\n\n**Latent diffusion is what made it cheap enough to ship.** Running diffusion directly on megapixel images is enormously expensive. Latent diffusion first compresses images into a small latent space with a VAE, runs the whole noising/denoising process there, and only decodes back to pixels at the end. This cut the compute by orders of magnitude and is why Stable Diffusion could run on consumer GPUs. Modern systems increasingly replace the U-Net denoiser with a Transformer (a DiT), inheriting the scaling behavior of large Transformers.\n\n| Piece | Role | Learned? |\n|---|---|---|\n| Forward process | add noise on a fixed schedule | no — defined, not trained |\n| Reverse network (U-Net / DiT) | predict the noise to remove | yes — the entire model |\n| Sampler (DDPM, DDIM, ...) | run reverse steps to generate | no — an algorithm |\n| Conditioning + guidance | steer output toward a prompt | conditioning trained in |\n| VAE (latent diffusion) | compress to a cheap latent space | yes — separately trained |\n\nRead diffusion through a *learn-to-denoise* lens rather than a *paint-a-picture* lens: the model never learns to draw, it only ever learns the far easier task of estimating "how much noise is in this image and what does it look like." Generation is just that one humble skill applied over and over, starting from nothing but static — and the schedule, the conditioning, and the latent-space trick are the engineering that turns that skill into a controllable, affordable image generator.\n
diffusion modelstable diffusionddpmimage generationgenerative ai
Related Topics
Explore 500+ Semiconductor & AI Topics
From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.