Part XXIII — Modern Architectures, Generative Models & LLM Engineering · Chapter 4

Consistency models

Hook

Last chapter's straight path only needed one Euler step because its velocity was constant — a convenient accident of using a perfectly straight line. Real diffusion trajectories curve. Can a model still jump straight to the endpoint from any point along a curved path, in one shot?

Intuition
x_t = 0.100 at t = 0.30 → f(x_t, t) = 5.000 — one jump, straight to the endpoint

Drag tt anywhere. The second point never moves — every value of tt on this trajectory maps to the exact same endpoint, through one function call, no matter how far from t=1t{=}1 you start.

Formalize

A consistency model learns a function f(xt,t)f(x_t, t) trained so that any two points on the same trajectory map to the same output — the endpoint. On this chapter's straight-line paths, that function has a closed form:

f(xt,t)=xt+(1t)(x1x0)=x1,for every tf(x_t, t) = x_t + (1-t)\big(x_1 - x_0\big) = x_1, \qquad \text{for every } t
  • f(xt,t)f(x_t, t) — the consistency function: maps any point on a trajectory, at any time tt, straight to that trajectory's endpoint.
  • xtx_t — the point on the trajectory at time tt.
  • x0x_0 — the trajectory's starting point (noise, at t=0t=0).
  • x1x_1 — the trajectory's endpoint (data, at t=1t=1) that ff should output for every tt on this trajectory.
  • tt — the time parameter identifying where along the trajectory the input point sits.
  1. Self-consistency holds for any t

    The middle expression above holds for any ttff doesn't care how far along the trajectory it's asked to evaluate, it always outputs the endpoint.

  2. Curved trajectories have no closed form

    Real consistency models are trained on the genuinely curved trajectories that diffusion models produce, where no such closed form exists.

  3. A distillation loss teaches the shortcut

    A consistency-distillation loss explicitly penalizes disagreement between ff's outputs at two nearby points on the same trajectory, teaching the shortcut a curved path doesn't hand you for free.

Play

Five wildly different starting points along the same trajectory — five identical bars. That flatness is the trained property, not a coincidence of the numbers: a consistency model that got this wrong would show five different heights instead.

Worked example

Trajectory (x0,x1)=(2,5)(x_0, x_1) = (-2, 5), checked at two very different values of tt:

  1. t = 0.3

    x0.3=0.7(2)+0.3(5)=0.1x_{0.3} = 0.7({-}2) + 0.3(5) = 0.1. f(x0.3,0.3)=0.1+0.7(7)=5f(x_{0.3}, 0.3) = 0.1 + 0.7(7) = 5.

  2. t = 0.8

    x0.8=0.2(2)+0.8(5)=3.6x_{0.8} = 0.2({-}2) + 0.8(5) = 3.6. f(x0.8,0.8)=3.6+0.2(7)=5f(x_{0.8}, 0.8) = 3.6 + 0.2(7) = 5.

  3. Same trajectory, same answer

    Two completely different inputs — (0.1,0.3)(0.1, 0.3) and (3.6,0.8)(3.6, 0.8) — produce the identical output. That's not a special property of t=0.3t{=}0.3 or t=0.8t{=}0.8; it holds for every tt on this trajectory, because both points sit on the same straight line to x1=5x_1=5.

Checkpoint

Find the candidate, among the three, whose consistency-function output is negative.

Pick a candidate to try it
Summary
f(xt,t)=f(xt,t)for any t,t on the same trajectoryf(x_t, t) = f(x_{t'}, t') \quad \text{for any } t, t' \text{ on the same trajectory}

Sampling from a real consistency model costs one network evaluation instead of the dozens or hundreds a diffusion model's reverse process needs — the entire trajectory is collapsed into a single learned jump. The price is a genuinely harder training problem: teaching a network self-consistency along curved paths it doesn't get to see in closed form, unlike this chapter's straight lines. The next chapter leaves continuous generation behind entirely and asks what happens when a model's latent space isn't a smooth continuum at all, but a small, fixed vocabulary of learned codes.