Foundation reference

Consistency Models

A consistency model generates a sample in one network evaluation, where a diffusion sampler usually needs tens to hundreds. With consistency distillation, Song et al. (2023) reported one-step FID scores of 3.55 on CIFAR-10 and 6.20 on ImageNet 64×64 (lower is better).

Concept 78 of 100Generative ModelsStudy phase 4
Key equation
f(xt,t)=xϵfor all t∈[ϵ,T]f(x_t, t) = x_\epsilon \quad \text{for all } t \in [\epsilon, T]
Reading map and next steps

Study guide

Where to start

Concept 78 of 100Consistency ModelsGenerative Models · Study phase 4: Generative modeling families
Question

Why does requiring every point on a trajectory to map to the same end point force the network to learn the whole ODE solution, not just one step of it?

How to study this pagePredict · Check · Generalize · Continue
PredictSay what you expect.

Pick a concrete input and say what the equation should give before you read the math.

CheckCheck against the math and the papers.

Work through the math, then read the cited papers for the original argument.

GeneralizeName what stays the same.

Identify the part of the idea that survives a change of notation or model, so you can recognize it in another paper or system.

ContinueFollow the connections.

Use the prerequisites and related concepts at the end of the page to fill the next gap.

Why It Matters for Modern Models

  • A consistency model generates a sample in one network evaluation, where a diffusion sampler usually needs tens to hundreds. With consistency distillation, Song et al. (2023) reported one-step FID scores of 3.55 on CIFAR-10 and 6.20 on ImageNet 64×64 (lower is better).
  • Consistency models can also be trained from data alone, without a pretrained diffusion model: improved consistency training reached one-step FID scores of 2.51 on CIFAR-10 and 3.25 on ImageNet 64×64, and 2.24 and 2.77 with two steps (Song & Dhariwal, 2024).
  • The same model can use extra steps when they are affordable: alternating denoising with re-noising improves the samples, so one model covers a range of speed and quality trade-offs (Song et al., 2023).

Questions to Think About

  • How can consistency training enforce self-consistency without a pretrained diffusion model to say which points lie on the same trajectory?
  • Why does a multistep consistency sampler add noise back in between denoising steps, and why does that improve the sample?

Core Math

Key Equation
f(xt,t)=xϵfor all t∈[ϵ,T]f(x_t, t) = x_\epsilon \quad \text{for all } t \in [\epsilon, T]

A diffusion model defines a probability-flow ODE whose trajectories carry each noise sample xTx_T to a data sample as time runs from TT down to a small ϵ>0\epsilon > 0 (Song et al., 2021). A consistency function maps every point on such a trajectory to the trajectory's end point (Song et al., 2023):

f(xt,t)=xϵfor all t∈[ϵ,T]f(x_t, t) = x_\epsilon \quad \text{for all } t \in [\epsilon, T]

Two properties follow:

  • Self-consistency: f(xt,t)=f(xt′,t′)f(x_t, t) = f(x_{t'}, t') whenever xtx_t and xt′x_{t'} lie on the same trajectory.
  • Boundary condition: f(xϵ,ϵ)=xϵf(x_\epsilon, \epsilon) = x_\epsilon. Song et al. build this into the network as fθ(x,t)=cskip(t) x+cout(t) Fθ(x,t)f_\theta(x, t) = c_{\text{skip}}(t)\, x + c_{\text{out}}(t)\, F_\theta(x, t) with cskip(ϵ)=1c_{\text{skip}}(\epsilon) = 1 and cout(ϵ)=0c_{\text{out}}(\epsilon) = 0.

Training enforces self-consistency between neighbouring times tn<tn+1t_n < t_{n+1} of a discretized trajectory:

L=E[λ(tn) d(fθ(xtn+1,tn+1), fθ−(x^tn,tn))]\mathcal{L} = \mathbb{E}\left[\lambda(t_n)\, d\big(f_\theta(x_{t_{n+1}}, t_{n+1}),\ f_{\theta^-}(\hat{x}_{t_n}, t_n)\big)\right]

where dd is a distance between images and θ−\theta^- is a copy of θ\theta that receives no gradient (an exponential moving average in the original paper). In consistency distillation, x^tn\hat{x}_{t_n} comes from one ODE-solver step of a pretrained diffusion model. In consistency training, both points are made from the same data sample and the same noise, so no pretrained model is needed.

Sampling takes one network evaluation, xϵ=fθ(xT,T)x_\epsilon = f_\theta(x_T, T) with xT∼N(0,T2I)x_T \sim \mathcal{N}(0, T^2 I), or alternates denoising and re-noising for a few more steps to trade compute for quality.

Key Papers

Consistency Models

Song et al.2023ICML
Read paper →

Improved Techniques for Training Consistency Models

Song & Dhariwal2024ICLR
Read paper →

Score-Based Generative Modeling through Stochastic Differential Equations

Song et al.2021ICLR
Read paper →

Connections