Diffusion Model

A generative model that learns to undo a fixed noising process — what the network really predicts, why the step count is the cost, and why it displaced GANs.

Published Updated

On this page

Definition

A diffusion model is a generative model trained to undo a corruption it was first shown how to perform. You take a real example, mix in a measured amount of random noise, and train a network to answer one question: which part of this was the noise? Repeat for every noise level from a barely perceptible haze to complete static, and you have a machine that can start from static and subtract its way to something that was never in the training set.

The thing worth noticing before anything else is what is not in that description. There is no notion of a good output anywhere in the training objective — no critic, no adversary, no aesthetic term, no reward. The loss is the squared error between the network's guess at the noise and the noise you drew yourself a microsecond earlier, which means the correct answer is always available and the target never moves. A diffusion model is a regression model. Everything people find surprising about it, including the fact that it displaced adversarial training almost completely, follows from that one design choice.

The name comes from physics: drop ink in water and it diffuses irreversibly toward uniform grey. You cannot run that backwards, but you can learn a very good guess at what a slightly less diffused state looked like, and chaining a few dozen of those guesses together is enough. The forward direction — the destruction — involves no learning at all. It is a fixed formula the designer picks in advance, which is the reason training data for it is free and infinite.

What breaks if you skip this page. People carry over the cost model of a language model, where one forward pass produces one token. A diffusion model produces nothing per forward pass. A single image at fifty sampling steps with guidance switched on is one hundred full evaluations of the network, and that factor of a hundred is the difference between a capacity plan that holds and one that is wrong by two orders of magnitude. It is also why every knob in a generation interface is really a knob on the same number.

This page is the mechanism, which is shared. The modality pages own their own specifics: image generation for the text-to-image loop and its knobs, video generation for what changes when the output must agree with itself over time, and diffusion language models for the discrete-token variant. Generative AI covers the prior question of what it means to sample from a learned distribution at all.

How It Works

The forward process: wreck the data on a schedule, and learn nothing

Training starts with a procedure that contains no parameters. Take a clean example x0, choose a step index t, draw Gaussian noise eps, and mix:

x_t = sqrt(alpha_bar_t) * x0  +  sqrt(1 - alpha_bar_t) * eps

alpha_bar_t is how much of the original signal's power survives to step t. It comes from a noise schedule fixed before training begins. Ho, Jain and Abbeel's Denoising Diffusion Probabilistic Models set T = 1000 and let the per-step variance rise linearly from 0.0001 to 0.02; the image generation page tabulates what that schedule actually does to a picture.

Two consequences matter more than the formula. First, the expression is closed-form in t: a training example at step 800 costs exactly the same as one at step 3, because you never simulate the intervening steps. Sample a datum, sample a t, sample noise, mix — that is the entire data pipeline, and it generates unlimited labelled pairs from a finite dataset. Second, because the forward process is chosen rather than learned, it can be redesigned without touching the model, which is precisely what flow matching later did.

The reverse process: one question, asked a thousand times

The network receives x_t and the step index t, plus whatever conditioning the model uses — a prompt, a class label, a robot's camera view — and outputs a prediction of eps. The loss function is the squared error against the noise that was actually mixed in. There is nothing else in it.

That the target is the noise rather than the image looks like an arbitrary convention, and the paper's own ablation shows it is not. Under the full variational objective the two parameterisations are nearly indistinguishable on CIFAR-10 — FID 13.22 when the network predicts the posterior mean, 13.51 when it predicts the noise. The gap opens only when the objective is simplified to plain unweighted squared error: in the noise parameterisation that simplification produces FID 3.17 and Inception Score 9.46, the paper's headline result, while the same simplification applied to mean-prediction was unstable to train and reported no score at all. So noise prediction is not intrinsically better at the task. It is the coordinate system in which the simple objective is well-behaved — and the simple objective is what makes the model good.

There is a second reading of the same quantity, and it is the one that connects diffusion to everything that came before it. The predicted noise, divided by the noise level and negated, is an estimate of ∇ log p(x_t) — the direction in which the data becomes more probable. The network is learning a score function: a vector field over the whole space pointing uphill toward the data. Sampling is a walk that follows that field, beginning where it is smooth and easy to follow — pure noise, where the smoothed distribution is nearly Gaussian — and ending where it is sharp and hard, at the real data. This is why the same object is called a score-based model in half the literature.

The sampling loop, and why it takes small steps

Generation inverts the mixing equation. From the predicted noise, algebra gives the model's implied guess at a clean sample; instead of returning that guess, you re-noise it to the next lower level and ask again:

x0_hat  = (x_t - sqrt(1 - alpha_bar_t) * eps_hat) / sqrt(alpha_bar_t)
x_{t-1} = sqrt(alpha_bar_{t-1}) * x0_hat + sqrt(1 - alpha_bar_{t-1}) * eps_hat

Not jumping straight to x0_hat is the whole trick. The denoiser is calibrated to the noise level it is looking at, and from near-total static its best guess is a blurred average of every sample the noise could have been hiding. The ## Code Example below prints exactly this: three trajectories whose first-step guesses are 1.305, 0.894 and -5.832 on data whose only valid values cluster at -2.0, 0.5 and 3.0. Nineteen steps later the same three guesses are -1.996, 0.547 and 3.083. Nothing was drawn; the estimate was refined until it stopped being an average.

The information does not arrive evenly, and the DDPM authors measured where it does. Treating the reverse chain as a progressive decoder, they report the cumulative bits per dimension transmitted at each point: 1.77581 bits/dim over the full 1,000 steps, of which only 0.11994 has arrived after the first 900. The final hundred steps carry 93% of the information in the sample. Everything before that is deciding coarse structure at a cost of almost no bits — which is simultaneously why early steps can be skipped aggressively, and why the last few cannot.

Steps are the price, and the price has fallen a thousandfold

The honest unit of cost for a diffusion model is the number of function evaluations — how many times the network runs to produce one output. Every other cost is a multiplier on it.

Song, Meng and Ermon's DDIM showed the chain can be reinterpreted as a deterministic process evaluated on any subsequence of the training steps, using the same weights with no retraining, and reported samples of comparable quality 10x to 50x faster in wall-clock time. Their CIFAR-10 FID moves from 4.04 at 1,000 steps to 4.67 at 50 — and the control row is the interesting one: shortening the chain the stochastic way, with DDPM's own variance setting, gives FID 367.43 at 10 steps. Same weights, same ten evaluations, ninety times the error. The sampler and the model are separable, and most of the early speedups were sampler work rather than model work.

Distillation went further by changing the weights. Consistency models are trained so that every point on a trajectory maps directly to its endpoint, collapsing the chain into a single hop; Song et al. report CIFAR-10 FID 3.55 with one network evaluation and 2.93 with two. Set that beside DDPM's 3.17 at a thousand evaluations and three years of progress fits on one line: comparable sample quality for a thousandth of the sequential work.

Latent diffusion: run the loop somewhere smaller

The loop's cost is paid per step, so the cheapest optimisation is to make each step operate on less data. Latent diffusion (Rombach et al., CVPR 2022) puts an autoencoder in front: the encoder compresses each example by a spatial factor f in each dimension into c channels, the diffusion model runs entirely inside that space, and the decoder runs exactly once at the end.

The arithmetic is one line and it is the reason these models fit on a laptop. For an RGB image, the ratio of numbers is f² × 3 / c. At the f = 8, c = 4 configuration Stable Diffusion shipped with, that is 48 times fewer numbers per step, every step. Attention saves more than that again: its cost grows with the square of the position count, and the position count fell by f² = 64, so the pairwise work falls by 64² = 4,096.

What that formula also predicts is the trade newer models made. Stability's rectified-flow paper reports reconstruction quality for autoencoders at the same f = 8 with 4, 8 and 16 latent channels: PSNR 25.12, 26.40 and 28.62 dB, and reconstruction FID 2.41, 1.56 and 1.06. The 16-channel encoder is strictly better at preserving detail, and it costs four times as many numbers per step — compression drops from 48x to 12x. The team chose it anyway, because the autoencoder is a ceiling: no amount of denoising can recover detail the encoder threw away, so buying headroom there buys quality nothing downstream can. Fine typography, distant faces and dense texture are where a too-aggressive latent shows first.

Guidance: two predictions per step, and the difference between them

A conditional diffusion model trained in the obvious way follows its condition only loosely. Classifier-free guidance (Ho and Salimans, 2022) fixes that by training one network to do two jobs: the condition is replaced by a null token on some fraction of training examples — the authors found 10% or 20% works and 50% is worse — so the same weights learn both the conditional and unconditional denoiser. At sampling time you run both and extrapolate along the difference:

eps_guided = (1 + w) * eps(x_t, condition) - w * eps(x_t, null)

This is not a "follow the prompt harder" slider, and treating it as one is the most common misreading of a generation interface. It is an exponent on the conditional distribution: you are sampling from something sharper than the model's actual posterior, and past a certain point you are sampling from a caricature of it. The paper's own ImageNet 128x128 sweep makes the shape unmissable. With 256 sampling steps, FID starts at 7.27 unguided, improves to a minimum of 2.43 at w = 0.3, and then degrades all the way to 21.53 at w = 4.0 — nearly nine times worse than its own optimum — while the Inception Score rises monotonically from 82.45 to 421.03. Every sample looks more like its class; the set of samples has stopped covering the class. The authors note in passing that strongly guided samples "display saturated colors", which is the over-contrasted look people attribute to AI images and which is in fact a sampler setting.

Two practical consequences. Guidance doubles the cost of every step, because each step now needs two network evaluations, so fifty steps at any guidance above zero is a hundred evaluations. And the number in the interface is not the w in the paper: the Hugging Face diffusers implementation computes uncond + guidance_scale * (cond - uncond), which is the formula above with guidance_scale = 1 + w, so its default of 7.5 is w = 6.5 — far past where the ImageNet sweep found its FID optimum. Text-to-image systems run there deliberately, because prompt adherence rather than distribution-matching is what users are judging — but they are trading away diversity to do it, and that trade is a choice, not a fact about the model.

Why a regression beat a two-player game

Until about 2021 the sharpest image generators were generative adversarial networks: a generator making samples and a discriminator trying to tell them from real data, each trained on the other's failures. Diffusion displaced them almost entirely within two years, and the reason is not that the samples were prettier. It is that the objective is a fixed target.

A GAN generator's loss depends on a discriminator that is itself still learning. The target moves every step, the loss value carries no information about output quality — a generator can have a beautiful loss curve and produce garbage — and the equilibrium being sought is a saddle point rather than a minimum, which optimisers designed for minima reach unreliably. In practice that shows up as the two failure modes GAN practitioners name and manage: mode collapse, where the generator gives up on parts of the distribution and produces a narrow band of outputs, and non-convergence, where the pair oscillates instead of settling. Those belong to the GAN page; what matters here is that a diffusion model cannot have either, because there is no second player. The target is a Gaussian sample the training loop drew itself. Loss down means model better, always, and the recipe scales by adding data and parameters rather than by tuning a fragile balance.

The consequence is measurable, and Dhariwal and Nichol's Diffusion Models Beat GANs on Image Synthesis measured it with precision and recall over the data manifold — precision meaning "samples look real", recall meaning "the model covers the real distribution". On ImageNet 256x256, BigGAN-deep scores FID 6.95 with precision 0.87 and recall 0.28; their guided diffusion model scores FID 4.59 with precision 0.82 and recall 0.52. Read those two pairs carefully, because the story is entirely in the second number: the GAN is slightly more convincing sample by sample, and covers a little over half as much of the distribution. The same gap appears at every resolution they tested — 0.35 against 0.59 at 128x128, 0.29 against 0.42 at 512x512.

That is the whole trade in one row. Mode collapse is not an occasional GAN accident; it is the systematic cost of an objective that rewards fooling a critic rather than covering a distribution. Diffusion's likelihood-flavoured objective pays attention to every training example, including the rare ones.

And the price is exactly where you would expect. A GAN generates in one forward pass. The diffusion numbers above were sampled with 250 steps, and even the paper's fast configuration needed 25. Sampling cost is the tax diffusion pays for the stable objective and the coverage, which is why so much of the subsequent research — deterministic samplers, distillation, straighter paths — has been an effort to pay less of it. The gap has closed by roughly three orders of magnitude and has not closed completely.

Real-World Applications

Every mainstream image, video and audio generator is this loop. The products differ in the size of the network, the text encoder, the training data and the licence, far more than in the mechanism; a 2022 latent diffusion model and a 2026 flow-matching transformer are running recognisably the same sampling loop at different quality. If you arrived here from a search for a specific system, Stable Diffusion — released in 2022, and the first of these to ship as a download rather than an API — is the catalog page, image generation is the text-to-image loop in detail, and video generation is what changes when the frames have to agree with each other.

Robot manipulation policies, where the reason diffusion helps is unusually crisp. A robot copying human demonstrations faces a distribution with genuinely multiple right answers: two operators route the gripper around an obstacle on opposite sides, and a network trained to regress "the" correct action averages them into a trajectory that goes straight through the obstacle. Diffusion Policy (Chi et al., 2023) instead treats the next chunk of actions as a sample to be denoised, so the model can represent both routes and commit to one. Evaluated across 15 tasks from 4 robot manipulation benchmarks, it reports an average improvement of 46.9% over the previous methods. Multi-modality is exactly what a squared-error regressor destroys and a sampler preserves, which is why this transferred out of computer vision so quickly.

Ensemble weather forecasting, where the spread is the product. DeepMind's GenCast is a diffusion model that denoises 15-day global forecasts, and it beat the ECMWF's ENS — the leading operational ensemble — on the large majority of the 1,320 variable-and-lead-time targets they evaluated. The point is not the accuracy but the form of the output: you cannot price hurricane risk from a single forecast, you need a distribution over futures, and a model that samples gives you one where a model that predicts gives you a mean.

AlphaFold 3's structure module is a diffusion module. The 2024 Nature paper replaced AlphaFold 2's frame-and-torsion structure module with a diffusion process that predicts raw atom coordinates directly — a case where diffusion did not enter a new field so much as take over the final stage of an existing, extremely well-validated system. The paper is also candid about what came with it, and that caveat is in ## Challenges below because it generalises.

Where a diffusion model is the wrong choice is worth stating plainly, since it is a real decision people get wrong. If the output is short and the latency budget is one forward pass — a ranking score, a classification, an embedding — a sampler that runs the network twenty times is absurd. If the data is discrete and strongly ordered, autoregression already factorises it exactly and the noising process has to be redefined before diffusion applies at all. Diffusion earns its cost on high-dimensional continuous outputs whose distribution is genuinely multi-modal and where you need samples rather than an average.

Key Concepts

These five are what the interfaces and papers actually expose, and each one is a lever on the same loop.

  • Noise schedule — the fixed map from step index to how much signal survives. It is chosen, not learned, and it determines where in the chain the model spends its capacity. Redesigning it is the cheapest large intervention available, and rectified flow is exactly that intervention.
  • Function evaluations (NFE), not "steps" — the number of times the network runs per output. Guidance multiplies steps by two, so a "50-step" generation is usually 100 NFE, and comparing a distilled 4-step model to a 50-step one on step count alone understates the gap by half.
  • Sampler or solver — the rule for getting from one noise level to the next. DDIM, Euler, DPM-Solver++ and the rest are different numerical integrators of the same learned trajectory, which is why swapping one for another changes the output with no retraining, and why a quality number is meaningless without the sampler and step count beside it.
  • Guidance scale — the exponent discussed above. Raising it increases fidelity to the condition and decreases coverage of the distribution, on a curve that has an optimum and a far side.
  • Latent space — the compressed representation the loop runs in. It sets a hard ceiling on achievable detail (f² × 3 / c numbers survive per step) and is the reason a generation can be blurry in a way no prompt or step count will fix.

Challenges

Sampling cost is the defining weakness and it is structural. A GAN or a VAE decoder produces a sample in one pass; diffusion needs tens, doubled again by guidance. Distillation has closed most of that gap but not for free — a distilled few-step model is a different set of weights with its own quality profile, and the diversity lost at low step counts is the first thing to go and the last thing anyone notices, because individual samples still look fine while the distribution has quietly narrowed. The code below shows this happening on data simple enough to check: at 20 steps the model recovers mode proportions of 48.7 / 17.0 / 29.5 against a true 50 / 20 / 30, and at 2 steps it puts 44.6% of its samples nowhere near any mode at all.

Published quality numbers are configuration claims, not model claims. Because the sampler is separable from the weights, the same checkpoint can post an FID of 4.04 or 367 depending on which sampler and how many steps — a factor of ninety. Any benchmark table for a diffusion model that omits sampler, step count and guidance scale is under-specified to the point of being unusable, and comparisons drawn across papers that used different values are comparing samplers.

The model always returns a sample, including where there is nothing to sample. AlphaFold 3's authors state this directly: the switch from the non-generative AlphaFold 2 to the diffusion-based AlphaFold 3 introduced "spurious structural order (hallucinations) in disordered regions", where the model invents plausible-looking structure in parts of a protein that genuinely have none. They mitigate it by distilling from AlphaFold 2's predictions, which produce ribbon-like output in disordered regions, and by ranking. This is the generic hazard of a sampler used as a predictor: there is no "insufficient evidence" output, only a draw from whatever the model believes, and confidence scores are the only signal that anything is missing.

Guidance is doing more of the work than its users think. The ImageNet sweep above shows FID nine times worse at high guidance than at the optimum, so a large share of the outputs people evaluate are not samples from the trained distribution at all. Four generations that look like the same photograph is usually a guidance setting, not a memorised training image — and diagnosing it as the latter has led people to conclusions about training data that the evidence does not support.

Likelihoods are bounded, not exact. Diffusion training optimises a variational bound, so unlike an autoregressive model you cannot read off an exact log-likelihood for a given input. That rules diffusion out of the tasks where the number itself is the product — compression with guarantees, likelihood-ratio anomaly tests — and it is why the density-estimation literature still uses other families.

The encoder is a ceiling nothing downstream can raise. In a latent model, detail the autoencoder cannot represent cannot be produced by the decoder, no matter how good the denoiser or how many steps it runs. That is a property of the compression, measurable in advance as reconstruction quality, and it is why the channel-count arithmetic above was worth spelling out: the model's best possible output is the encoder's reconstruction of the best possible input.

Flow matching and rectified flow are replacing the noise schedule itself. Because the forward process is chosen rather than learned, it can simply be made easier to invert. Rectified flow defines it as a straight line between data and noise — z_t = (1 - t) * x0 + t * eps — and trains the network to output the velocity along that line rather than the noise. A curved trajectory needs many small integration steps to follow accurately; a perfectly straight one could in principle be traversed in a single step, and every step you remove is a whole network evaluation. This is why flow matching and step distillation are the same trend approached from opposite ends: one straightens the path, the other learns to shortcut a curved one. The formulation is now standard in new large image and video models, and the vocabulary in papers has shifted with it from "denoiser" to "velocity field".

Few-step generation is becoming the shipped default rather than a turbo mode. Once one or two evaluations suffice, the cost structure of a generative product changes character: interactive editing, per-keystroke previews and on-device generation all stop being demos. The open question is not whether the step count reaches one but what it costs in coverage when it does — the distribution-narrowing above is the failure mode that few-step evaluations under-report, because it is invisible in any single sample and only shows up in a set.

Diffusion is being pushed onto data that is not continuous, by replacing Gaussian noise with a corruption that makes sense for the data type — masking for tokens, in the case of diffusion language models, which own that argument. The general lesson is that "add noise, learn to remove it" is a template with two slots, and swapping the noise for a different corruption process is a live research direction wherever a domain has multi-modal outputs and a natural way to degrade them.

Architecturally the convergence is nearly complete. The convolutional U-Net that carried the first generation of image models has been giving way to transformers over latent patches, which is the same consolidation that already happened in language. That matters here mainly because it decouples the two things this page keeps separating: the architecture predicting the noise and the process that defines what noise means are independent choices, and the field is standardising the first so it can keep experimenting with the second.

Code Example

This trains an actual denoiser — a two-layer network, in NumPy, with hand-written gradients — on a one-dimensional distribution with three modes at -2.0, 0.5 and 3.0 and deliberately uneven weights of 50% / 20% / 30%. Nothing about the loop is faked or solved in closed form: the network really is a regressor whose only target is the noise, and the sampler really is the reverse process described above. Because the true distribution is known exactly, mode coverage can be checked rather than eyeballed.

import numpy as np
rng = np.random.default_rng(0)

# The data: three modes with deliberately uneven weights, 50% / 20% / 30%.
MU, W, SD = np.array([-2.0, 0.5, 3.0]), np.array([0.5, 0.2, 0.3]), 0.25
def draw(n):
    return MU[rng.choice(3, size=n, p=W)] + SD * rng.standard_normal(n)

# The forward process. Fixed in advance, nothing here is learned.
T = 1000
alpha_bar = np.cumprod(1.0 - np.linspace(1e-4, 0.02, T))

# The network: two hidden layers, one output -- the predicted NOISE.
H = 64
P = [rng.normal(size=(3, H)) * 0.5, np.zeros(H),
     rng.normal(size=(H, H)) * 0.2, np.zeros(H),
     rng.normal(size=(H, 1)) * 0.2, np.zeros(1)]

def eps_hat(x, ab):
    f = np.stack([x, np.sqrt(ab), np.sqrt(1 - ab)], 1)   # x_t, plus the noise level
    h1 = np.tanh(f @ P[0] + P[1])
    h2 = np.tanh(h1 @ P[2] + P[3])
    return (h2 @ P[4] + P[5])[:, 0], (f, h1, h2)

def train_step(lr, n=512):
    x0 = draw(n)
    ab = alpha_bar[rng.integers(0, T, n)]
    eps = rng.standard_normal(n)
    xt = np.sqrt(ab) * x0 + np.sqrt(1 - ab) * eps        # any t in one line, no simulation
    pred, (f, h1, h2) = eps_hat(xt, ab)
    g = (2.0 / n) * (pred - eps)[:, None]                # d(MSE)/d(prediction) -- plain regression
    d2 = (g @ P[4].T) * (1 - h2**2)
    d1 = (d2 @ P[2].T) * (1 - h1**2)
    for p, gr in zip(P, [f.T @ d1, d1.sum(0), h1.T @ d2, d2.sum(0), h2.T @ g, g.sum(0)]):
        p -= lr * gr
    return float(((pred - eps) ** 2).mean())

for i in range(30001):
    loss = train_step(0.02 if i < 20000 else 0.005)
    if i % 10000 == 0:
        print(f"  train step {i:6d}   noise-prediction MSE {loss:.4f}")

def sample(n_steps, x):
    """Deterministic (DDIM-style) reverse loop, starting from x ~ N(0,1)."""
    ts = np.linspace(T - 1, 0, n_steps).astype(int)
    for i, t in enumerate(ts):
        ab = np.full(len(x), alpha_bar[t])
        e, _ = eps_hat(x, ab)
        x0 = (x - np.sqrt(1 - ab) * e) / np.sqrt(ab)     # the implied clean sample
        ab_next = alpha_bar[ts[i + 1]] if i + 1 < n_steps else 1.0
        x = np.sqrt(ab_next) * x0 + np.sqrt(1 - ab_next) * e   # re-noise, one level less
        yield i, np.sqrt(alpha_bar[t]), x0, x

print("\nthree trajectories over 20 steps -- the model's guess at the clean sample:")
print("  step  signal left    guess A    guess B    guess C")
start = np.array([-0.7, 0.3, 1.4])
for i, sig, x0, _ in sample(20, start):
    if i % 4 == 0 or i == 19:
        print(f"  {i:4d}  {sig:10.4f}  {x0[0]:9.3f}  {x0[1]:9.3f}  {x0[2]:9.3f}")

print("\nmode coverage by step count -- the true weights are 50% / 20% / 30%")
print("  steps     -2.0      0.5      3.0   off-mode")
for k in (200, 20, 5, 2, 1):
    x = rng.standard_normal(40000)
    for _, _, _, x in sample(k, x):
        pass
    f = [100 * (np.abs(x - m) < 0.75).mean() for m in MU]
    print(f"  {k:5d}   {f[0]:5.1f}%   {f[1]:5.1f}%   {f[2]:5.1f}%   {100 - sum(f):6.1f}%")

Output:

  train step      0   noise-prediction MSE 1.1806
  train step  10000   noise-prediction MSE 0.3205
  train step  20000   noise-prediction MSE 0.3011
  train step  30000   noise-prediction MSE 0.3124

three trajectories over 20 steps -- the model's guess at the clean sample:
  step  signal left    guess A    guess B    guess C
     0      0.0064      1.305      0.894     -5.832
     4      0.0428     -0.409      0.287      0.232
     8      0.1823     -0.797      0.192      1.484
    12      0.4984     -1.641      0.640      2.707
    16      0.8767     -2.001      0.513      3.029
    19      0.9999     -1.996      0.547      3.083

mode coverage by step count -- the true weights are 50% / 20% / 30%
  steps     -2.0      0.5      3.0   off-mode
    200    49.3%    16.3%    31.6%      2.8%
     20    48.7%    17.0%    29.5%      4.9%
      5    35.5%    16.7%    12.2%     35.6%
      2    16.9%    20.9%    17.6%     44.6%
      1    16.9%    20.4%    17.2%     45.4%

Read the two tables against each other. The trajectories start with only 0.64% of the signal left — effectively pure noise — and the model's first guesses at the answer are 1.305, 0.894 and -5.832, none of which is a value the data ever takes. That is the denoiser doing the only thing it can from static: returning something near the average of everything. By step 12 the three have separated onto different modes, and by step 19 they sit at -1.996, 0.547 and 3.083. No sample was drawn; the estimate stopped being an average.

The second table is the mode-coverage claim made earlier, measured. At 200 and 20 steps the sampler reproduces the training distribution's uneven weights to within a couple of points — including the 20% mode, the one a collapsed generator would be most likely to abandon. At 5 steps it starts to smear, and at 1 or 2 steps 45% of the samples land nowhere near any mode: with a single jump the model can only return that same blurred average, which for this data is a value that never occurs. The step count is not a quality slider on individual outputs. It is what buys the distribution.

Frequently Asked Questions

A model trained to undo a corruption it was shown how to perform. Take a real example, mix in a measured amount of random noise, and train a network to say which part was the noise. Do that for every noise level from a whisper to total static, and you can start from static and subtract your way to something new. The model never draws anything — it only ever answers 'how much of this is noise?'
Yes. Stable Diffusion, released in 2022, is a latent diffusion model: the denoising loop runs inside a compressed space produced by an autoencoder rather than on pixels, which is why it fits on consumer hardware. This page is the mechanism; the Stable Diffusion catalog page covers the versions, licence and hardware requirements of the product.
Because that is the parameterisation in which a plain squared-error loss works. In the 2020 DDPM paper the two choices score almost the same under the full variational objective — FID 13.22 for predicting the mean against 13.51 for predicting the noise — but when the objective is simplified to unweighted squared error, noise prediction reaches FID 3.17 while the mean-prediction equivalent was too unstable to train at all.
The network is only accurate near the noise level it is looking at, so one giant jump from static lands on a blurred average of everything the noise could have been. Each small step gives the next step a better input. The original formulation used 1,000 steps; deterministic samplers cut that to tens, and distilled models to one — which is the single biggest cost dial in the whole method.
Because the training objective is a regression, not a contest. A GAN's generator is chasing a discriminator that is simultaneously chasing it, so there is no fixed target and no loss value that means 'good'; diffusion regresses against noise you drew yourself, and the loss going down always means the model got better. The measured payoff is coverage: on ImageNet 256x256 a guided diffusion model scored 0.52 recall against BigGAN-deep's 0.28. The price is paid at sampling time, in network evaluations per image.
No. The recipe needs only a way to corrupt data continuously and a network that can regress the corruption, so the same loop drives video and audio generation, robot action prediction, weather ensembles and AlphaFold 3's atom-coordinate module. Text needed a modified version, because you cannot add 30% noise to a word — see diffusion language models.

Continue Learning

Explore our use-case guides and prompts to deepen your AI knowledge.