← Back to blogs

Diffusion and Flow Matching: A Field Guide

A guide to probability paths, scores, velocities, and fast sampling: how diffusion and flow matching connect, which distinctions matter, and how these ideas appear in image and video models.

An exact Gaussian flow transports a circular source distribution into an elliptical target distribution

Image and video generation is a task, not a single algorithm. Autoregressive models, masked-token models, GANs, diffusion models, and flow-based models solve that task in different ways. Several of them use random noise somewhere; that does not mean they all learn to remove Gaussian noise, or integrate a time-dependent vector field.

This article focuses on continuous, Gaussian-noise diffusion and continuous flow matching. They have useful mathematical connections, but understanding those connections requires keeping four things separate: the distribution at each time, the trajectories that connect those distributions, the quantity a network predicts, and the numerical procedure used to generate a sample.

TL;DR — five distinctions

  1. Noise-to-data transport describes a family of generators. It is not a definition of image or video generation, and even diffusion-based editing can start from a partially corrupted input.
  2. Matching distributions does not identify a unique ODE. A diffusion probability-flow ODE and a flow-matching ODE can coincide under a compatible construction; shared endpoints, or even shared time marginals, are insufficient on their own.
  3. Straight training interpolants do not guarantee straight, constant-speed sampling trajectories. Rectified flow learns a conditional average of endpoint displacements. Reflow changes the coupling and can make coarse integration more accurate.
  4. Diffusion v-prediction and flow-matching velocity are distinct targets. They coincide up to a time factor for a particular variance-preserving path, not for arbitrary schedules.
  5. Few-step results need their experimental context. Distillation, training from scratch, solver steps, network evaluations, and wall-clock latency measure different things.

Scope: several ways to generate an image or video

Approach What generation does Example
Autoregressive generation Predicts successive tokens, blocks, or scales, conditioned on previously generated content. VAR uses next-scale image prediction; VideoPoet uses autoregressive multimodal token modeling.
Masked-token generation Predicts and refines missing tokens, often in parallel. MaskGIT.
Adversarial generation Applies a learned generator to a latent input; adversarial training does not require a denoising trajectory at inference. GANs.
Continuous diffusion Learns quantities needed to reverse a specified corruption process, using a stochastic sampler or a related deterministic sampler. DDPM, score-based SDE models.
Continuous flow matching Fits a velocity field for transporting a source distribution to a target distribution. The source need not be Gaussian noise. Flow Matching, Rectified Flow.

These categories can overlap. Autoregression is a factorization of a distribution; it does not require discrete tokens. MAR, for example, combines autoregressive modeling with diffusion losses for continuous-valued tokens. A Transformer backbone also does not tell us whether a system is autoregressive, diffusion-based, or both.

Even within diffusion, initialization depends on the task. SDEdit adds noise to an existing image and starts the reverse process at an intermediate noise level. Conditional generation can also preserve observed regions or condition on reference frames. A single noise vector becoming a clean image is therefore an incomplete description of the larger field.

Notation and conventions

The mathematical sections use data at \(t=0\) and a source distribution at \(t=1\). Generation runs toward decreasing \(t\). Some cited papers use the opposite convention.

Symbol Meaning
\(x_0\sim p_{\mathrm{data}}\) A data sample, in pixel space or a learned continuous latent space.
\(\varepsilon\sim\mathcal N(0,I)\) Independent Gaussian noise, unless a different coupling is explicitly specified.
\(x_t=\alpha_t x_0+\sigma_t\varepsilon\) A Gaussian conditional interpolant with scalar schedule coefficients.
\(p_t(x)\) The marginal density of \(x_t\) after averaging over data and noise.
\(s_t(x)=\nabla_x\log p_t(x)\) The marginal score.
\(b_t(x)\) An instantaneous ODE velocity, with learned approximation \(b_\theta(x,t)\).
\(v^{\mathrm{VP}}\) The diffusion v-prediction target for a variance-preserving (VP) schedule.
\(u(x,r,t)\) An average velocity over a finite time interval, introduced in §1.7.
\(\gamma\) CFG scale: \(\gamma=1\) uses the conditional prediction alone.

For ideal noise-to-data interpolation, \(\alpha_0=1,\sigma_0=0\) and \(\alpha_1=0,\sigma_1=1\). Practical diffusion schedules may only approximate the noise endpoint. Identities involving densities and derivatives below apply where those quantities exist; divisions by \(\alpha_t\) or \(\sigma_t\) require nonzero denominators. Endpoint limits need separate care.


Part I — The mathematical connections

1.1 A probability path is not a sample trajectory

For independent data and Gaussian noise,

\[q_t(x\mid x_0)=\mathcal N(\alpha_t x_0,\sigma_t^2 I),\qquad p_t(x)=\int q_t(x\mid x_0)p_{\mathrm{data}}(x_0)\,dx_0.\]

This specifies a distribution at every time. It does not, by itself, specify how a sample at one time relates to a sample at another.

For example, a DDPM forward chain uses

\[q(x_k\mid x_{k-1})=\mathcal N(\sqrt{a_k}\,x_{k-1},\beta_k I),\qquad a_k=1-\beta_k,\qquad\bar a_k=\prod_{j=1}^k a_j.\]

Its marginal conditional on the clean sample is

\[q(x_k\mid x_0)=\mathcal N(\sqrt{\bar a_k}\,x_0,(1-\bar a_k)I).\]

We can sample this marginal in one operation as \(x_k=\sqrt{\bar a_k}x_0+\sqrt{1-\bar a_k}\varepsilon\). But reusing one fixed \(\varepsilon\) across all times produces a different joint process from the Markov chain, which injects fresh noise at each step. Their one-time conditional distributions can agree while their trajectories differ. The DDPM training objective uses this efficient marginal sampling identity. DDPM.

This distinction will recur: a path of distributions, a stochastic process, and a deterministic flow are different objects.

1.2 Score-based diffusion: two associated sampling dynamics

Consider the forward Itô SDE

\[dX_t=f(X_t,t)\,dt+g(t)\,dW_t,\]

with scalar, state-independent diffusion coefficient \(g(t)\). Under the regularity conditions for time reversal, its reverse-time SDE is

\[dX_t=\left[f(X_t,t)-g(t)^2s_t(X_t)\right]dt+g(t)\,d\bar W_t,\]

where time runs backward and the reverse Brownian increment has variance proportional to \(\lvert dt\rvert\). The associated probability-flow ODE is

\[\frac{dZ_t}{dt}=f(Z_t,t)-\frac12 g(t)^2s_t(Z_t).\]

With the exact score, matching initialization, and exact evolution, these dynamics share the forward process’s one-time marginals. They do not share sample paths. Estimated scores, a mismatched terminal prior, and discretization can break that distributional agreement in actual samplers. State-dependent diffusion requires additional terms. Score-Based Generative Modeling through SDEs.

For the independent Gaussian corruption of §1.1, the optimal squared-error noise predictor is \(\mathbb E[\varepsilon\mid x_t=x]\), and

\[s_t(x)=-\frac{\mathbb E[\varepsilon\mid x_t=x]}{\sigma_t}.\]

A sampled training noise is therefore a regression target, not the marginal score itself. Appendix A.2 derives the conditional expectation explicitly.

An ODE sampler is deterministic given its initial state and conditioning. It still generates a distribution because its initial state is random. Determinism alone also does not guarantee accurate few-step sampling.

1.3 Flow matching: learning a velocity without simulating the ODE

For a differentiable random interpolant \(X_t\), let \(U_t=dX_t/dt\). Squared-error regression learns

\[\mathcal L_{\mathrm{CFM}}=\mathbb E\left[\lambda(t)\|b_\theta(X_t,t)-U_t\|^2\right],\qquad b_t(x)=\mathbb E[U_t\mid X_t=x],\]

with positive time weighting \(\lambda(t)\). Under suitable integrability and smoothness, this marginal velocity satisfies

\[\partial_t p_t+\nabla\!\cdot(p_t b_t)=0.\]

The conditional regression loss and regression against \(b_t\) differ by a parameter-independent conditional-variance term. This is the simulation-free training principle: sample an interpolant state and its known target velocity instead of integrating the learned ODE during every training example. Sampling ordinarily still requires integration. Flow Matching, Flow Matching Guide and Code.

The probability-flow drift in §1.2 satisfies this same continuity equation. That provides a connection, not a uniqueness theorem. If a field \(a_t\) satisfies \(\nabla\!\cdot(p_ta_t)=0\), then \(b_t+a_t\) generates the same density evolution. For a stationary two-dimensional standard Gaussian, both zero velocity and rotational velocity \(a(x_1,x_2)=(-x_2,x_1)\) preserve the density, despite moving individual points differently.

A stronger identification is possible for the independent Gaussian interpolant and a compatible linear SDE. Write \(f(x,t)=f_t x\) and assume

\[\dot\alpha_t=f_t\alpha_t,\qquad \frac{d}{dt}\sigma_t^2=2f_t\sigma_t^2+g_t^2.\]

Then the conditional-mean velocity is exactly

\[b_t(x)=f_t x-\frac12g_t^2s_t(x).\]

Appendix A.3 shows the algebra. This equality requires the chosen construction; an arbitrary path need not admit such an SDE with nonnegative \(g_t^2\). Gaussian conditional paths are an important overlap between diffusion and flow matching, rather than the full scope of either framework. Stochastic Interpolants gives a broader treatment.

Diffusion specifies an SDE and its associated probability-flow ODE; flow matching fits an interpolant velocity. Compatible constructions can give equal fields, but equal marginals alone do not. Figure 1. The continuity equation connects the two constructions without making their velocity fields unique. Plotting code.

1.4 Rectified flow: straight targets, potentially curved learned motion

Take the linear interpolant

\[X_t=(1-t)x_0+t\varepsilon,\qquad U_t=\varepsilon-x_0.\]

Each training pair defines a constant-velocity line. The learned population field, however, is

\[b_t(x)=\mathbb E[\varepsilon-x_0\mid X_t=x].\]

Many endpoint pairs can contribute at the same state and time. The model averages their velocities; a generated sample follows this averaged field, not its own preassigned training pair. The resulting ODE trajectories need not be straight or constant-speed. Reflow constructs new endpoint pairs from the learned flow and trains again to improve straightness. A linear interpolation between independently paired endpoints also does not establish globally optimal transport between the two distributions. Rectified Flow.

Here is a concrete counterexample to the claim that linear interpolation makes one Euler step accurate. Let both \(x_0\) and \(\varepsilon\) be independent scalar standard Gaussians. Define

\[q(t)=(1-t)^2+t^2,\qquad X_t\sim\mathcal N(0,q(t)).\]

Gaussian conditioning gives

\[b_t(x)=\frac{2t-1}{q(t)}x,\qquad Z_t=\sqrt{q(t)}\,Z_1.\]

The exact ODE returns \(Z_0=Z_1\), preserving a standard Gaussian at the endpoint. One backward Euler step instead gives

\[\widehat Z_0=Z_1-b_1(Z_1)=0.\]

Every sample collapses to zero, even with an exact velocity predictor and perfectly straight training interpolants. In this one-dimensional example, the failure comes from the time-varying speed; in higher dimensions the direction can change too.

Top: straight conditional interpolants. Bottom: exact marginal ODE trajectories with changing speed, plus a one-step Euler update that collapses a sample to zero.

Figure 2. An analytically solvable Gaussian example. Both panels have the same one-time distributions in the population, but different endpoint couplings. The plotted curves in the lower panel show state versus time. The shaded band in each panel spans one population standard deviation around zero. The dashed Euler update fails to follow that evolution. Plotting code: plot_rectified_gaussian.py.

1.5 Prediction targets: noise, data, diffusion v, and transport velocity

For \(x_t=\alpha_t x_0+\sigma_t\varepsilon\), predictions of noise and data can be converted where the relevant coefficient is nonzero:

\[\widehat x_0=\frac{x_t-\sigma_t\widehat\varepsilon}{\alpha_t},\qquad \widehat\varepsilon=\frac{x_t-\alpha_t\widehat x_0}{\sigma_t}.\]

In the variance-preserving case, \(\alpha_t^2+\sigma_t^2=1\), diffusion v-prediction uses

\[v^{\mathrm{VP}}=\alpha_t\varepsilon-\sigma_t x_0.\]

Consequently,

\[\widehat x_0=\alpha_t x_t-\sigma_t\widehat v^{\mathrm{VP}},\qquad\widehat\varepsilon=\sigma_t x_t+\alpha_t\widehat v^{\mathrm{VP}}.\]

Writing \(\alpha_t=\cos\phi(t)\) and \(\sigma_t=\sin\phi(t)\) makes the distinction precise:

\[\frac{dX_t}{dt}=\dot\phi(t)\,v^{\mathrm{VP}}.\]

Thus v-prediction is a path derivative with respect to the angular parameter \(\phi\). The actual time velocity includes \(\dot\phi(t)\), and the marginal ODE field includes a conditional expectation. Progressive Distillation, Appendix D.

For rectified flow, the target is instead \(\varepsilon-x_0\). The linear schedule \(\alpha_t=1-t,\sigma_t=t\) is not variance-preserving. Its derivative cannot be identified with \(\alpha_t\varepsilon-\sigma_t x_0\) by simply calling both quantities “velocity.”

Algebraically convertible outputs also do not imply identical optimization. For example,

\[\|\widehat x_0-x_0\|^2=\frac{\sigma_t^2}{\alpha_t^2}\|\widehat\varepsilon-\varepsilon\|^2.\]

An unweighted data-prediction loss therefore weights noise levels differently from an unweighted noise-prediction loss. Time sampling, loss weighting, and preconditioning are substantive choices.

1.6 Conditioning and classifier-free guidance

Conditioning supplies information to the model; guidance changes how its predictions are used. A conditional generator works at guidance scale one. Cross-attention, joint attention, adaptive normalization, and reference-image inputs are mechanisms for conditioning, not forms of CFG by themselves.

Classifier-free guidance combines conditional and unconditional predictions. With condition dropout during training, a common convention is

\[\widetilde b_\theta(x,t,c)=b_\theta(x,t,\varnothing)+\gamma\left[b_\theta(x,t,c)-b_\theta(x,t,\varnothing)\right].\]

Here \(\gamma=0\) is unconditional, \(\gamma=1\) is conditional, and \(\gamma>1\) extrapolates. The same affine combination can be used with score or noise predictions when their parameterizations are compatible. Larger scales can improve some alignment or fidelity measures while reducing diversity or introducing artifacts; improvement is not guaranteed for every prompt or metric. Conventional CFG needs two predictions per step, sometimes batched together. Guidance-distilled models can avoid that runtime cost. Classifier-Free Diffusion Guidance, FLUX.1-dev model card.

With exact conditional and unconditional scores, a fixed-time identity is

\[\widetilde s_t=\nabla_x\log\left[p_t(x\mid c)^\gamma p_t(x)^{1-\gamma}\right].\]

This identifies a score of a tilted density at that time, when normalizable. It does not prove that the full guided sampler produces \(p_0(x\mid c)^\gamma p_0(x)^{1-\gamma}\) at its endpoint: the tilted densities need not satisfy the original forward diffusion equation. Appendix A.6 gives a simple illustration of the distinction.

1.7 Fast generation: better integration or a different learned object

Numerical solvers reduce integration error per unit of computation for an existing field. DPM-Solver exploits the structure of diffusion ODEs and demonstrates useful sampling with small evaluation budgets. Its results do not establish a universal floor of 10–20 steps. Accuracy depends on the field, schedule, guidance, solver, and evaluation criterion. DPM-Solver.

Distillation transfers behavior from a pretrained generator to a cheaper student. Progressive distillation, for example, repeatedly trains a student to replace two teacher updates with one. This changes the learned sampler, rather than merely swapping its numerical solver. Progressive Distillation.

Consistency models learn to map points on a probability-flow trajectory to a common low-noise endpoint. The original work includes both consistency distillation and consistency training without a pretrained teacher. A consistency function need not take two independently variable times: mapping to a fixed endpoint is already useful. Consistency Models.

Finite-interval models can learn transitions between two times. For an ODE trajectory \(dZ_\tau/d\tau=b_\tau(Z_\tau)\) and \(r<t\), define its average velocity

\[u(Z_t,r,t)=\frac{1}{t-r}\int_r^t b_\tau(Z_\tau)\,d\tau.\]

The exact flow map is then

\[\Phi_{r\leftarrow t}(x)=x-(t-r)u(x,r,t).\]

The average velocity \(u\) is a parameterization of this map, not the map itself. Holding \(r\) fixed and differentiating along a trajectory gives

\[u=b_t-(t-r)\left[\partial_tu+(b_t\cdot\nabla_x)u\right].\]

This motivates MeanFlow’s training objective. The identity alone is not a complete algorithm: regression targets, stop-gradient operations, and Jacobian-vector products matter. A learned \(u_\theta\) gives an approximate finite jump, not an exact solution by definition. Mean Flows for One-step Generative Modeling.

For a curved ODE trajectory, an Euler update follows the local tangent, while an exact finite-time map reaches the endpoint along the interval displacement. Figure 3. An exact rotational ODE separates three objects: the trajectory, a local Euler update, and the endpoint displacement represented by average velocity. Learning the displacement is a different approximation problem from estimating a local velocity. Plotting code.

Few-step methods share an efficiency goal, but not necessarily a teacher, objective, or exact underlying trajectory. One step also need not mean one network function evaluation (NFE). A solver can evaluate a field multiple times per step, and ordinary CFG adds conditional and unconditional evaluations. Decoding, text encoding, resolution, and hardware further separate NFE from latency.


Part II — Milestones and what their results establish

2.1 From diffusion processes to practical samplers

The history predates DDPM. Sohl-Dickstein et al. (2015) developed generative modeling by learning to reverse a gradual corruption process. Song and Ermon (2019) trained scores across noise levels and sampled with annealed Langevin dynamics.

DDPM (2020) established a particularly effective denoising formulation. DDIM (2020/2021) constructed alternative, including deterministic, sampling processes compatible with the same training objective. The score-SDE framework (2020/2021) connected several constructions and derived probability-flow ODEs. These developments broadened the choices of dynamics rather than proving that all generators use one sampler.

2.2 Representation and architecture are independent choices

Latent Diffusion (2021/2022) performs diffusion in a compressed autoencoder space, reducing the cost of spatial modeling. The continuous latent is not necessarily a discrete token vocabulary, and generating a latent still requires a decoder to produce pixels. Latent diffusion is not a requirement: Imagen Video (2022) uses a cascade of pixel-space video diffusion models.

DiT (2022/2023) demonstrated Transformer backbones for latent diffusion and measured improved FID with increasing compute in its experimental setting. This is evidence about that architecture and training setup, not a universal scaling law covering every image or video generator.

Stable Diffusion 3 (2024) combined rectified-flow training with MMDiT, whose modality-specific streams interact through attention. MMDiT is a particular design, not a synonym for every diffusion Transformer. For example, Wan’s implementation includes distinct visual self-attention and text cross-attention.

2.3 Flow matching and rectification

Flow Matching and Rectified Flow appeared as preprints in 2022 and at ICLR 2023. They made simulation-free velocity regression and the choice of transport paths especially useful in generative modeling.

The distinction between a path and its coupling is operational. Two training schemes can use the same source and target distributions while pairing individual endpoints differently. That changes the conditional velocities, their regression variance, and the learned transport. Even when two parameterizations describe the same ideal velocity, finite-capacity models trained with different loss weights need not learn equally accurate approximations. The Flow Matching Guide develops these choices beyond Gaussian image generation.

2.4 Few-step methods: read the training column first

The following are selected results from the linked paper versions, not a ranking across compatible experiments. FID measures the squared 2-Wasserstein distance between Gaussian fits to real and generated image features; lower values do not establish better prompt following, editing fidelity, or video coherence. Dataset, resolution, guidance, and sample protocol matter.

Method Training setting Reported result and qualification
sCM / TrigFlow Includes both consistency training (sCT) and distillation (sCD). On ImageNet 512×512, the 1.5B sCD model reports FID 1.88 at two steps. The corresponding sCT model reports 3.76, not 1.88. See Table 2.
Inductive Moment Matching Trains a generator through distribution matching without a pretrained diffusion teacher. Reports FID 1.99 at eight steps on ImageNet 256×256, with CFG. Eight steps should not be read as eight unconditional/conditional network evaluations in total.
MeanFlow Trains the generative network from scratch with an average-velocity objective. Reports FID 3.43 at one NFE on ImageNet 256×256, with a training formulation that incorporates guidance. This does not establish the same performance for arbitrary text-to-image or video tasks.
Shortcut Models Combines local flow targets with self-consistency targets; no separate pretrained teacher is required. Conditions on step size to support multiple sampling budgets in one model. Its training construction is distinct from merely running Euler with a larger step.

“From scratch” in this comparison concerns the generative network and its training procedure; it does not imply that all representation components, such as a latent autoencoder, were learned from scratch in the same experiment. Distributional convergence results likewise have mathematical assumptions; they are not unconditional guarantees for finite neural-network training.

Later work explores several directions. AlphaFlow, Terminal Velocity Matching, and Improved Mean Flows examine finite-time generation and its training objectives. Their connections do not make every few-step method the same objective.

Drifting Models illustrates an additional distinction: its generated distribution evolves through parameter updates during training, while inference applies a single-pass generator. It should not be described as just another numerical traversal of a fixed diffusion probability-flow ODE, or automatically classified as a two-time-conditioned flow-map model.


Part III — Reading actual image and video systems

A system combines a representation, backbone, prediction objective, conditioning mechanism, and sampler. Its product name does not identify all five. The examples below retain specific, publicly documented releases to illustrate these combinations. They are not an exhaustive list of the latest models or a live leaderboard. Sources were checked for this revision on October 2, 2026.

3.1 Image models: representative combinations

Release Documented design What to distinguish
SDXL 1.0 Latent diffusion with a U-Net backbone; the paper describes a base model and a separate refinement stage. The base model, refiner, text encoders, and autoencoder are separate components. A parameter count needs to specify which are included.
Stable Diffusion 3.5 Large An 8B MMDiT text-to-image model in the SD3 family. The family’s rectified-flow training, multimodal attention, and distilled variants are separate design choices. Large and Large Turbo are different checkpoints.
FLUX.1-dev / FLUX.1-schnell 12B rectified-flow Transformers. Dev is guidance-distilled; schnell uses latent adversarial diffusion distillation for 1–4-step sampling. Few-step behavior is checkpoint-specific. The dev and schnell weight licenses also differ.
FLUX.2-dev A 32B rectified-flow Transformer supporting generation and editing; its card specifies guidance distillation. This documents the dev checkpoint, not every closed or differently sized member of the FLUX.2 product family.
Qwen-Image MMDiT with flow-matching training and Qwen2.5-VL conditioning. Text rendering and editing are evaluated as capabilities; the architecture name alone does not establish a ranking. Released checkpoint.
HunyuanImage 3.0 An autoregressive multimodal framework that incorporates diffusion-based image generation in VAE space; the backbone uses MoE. Calling the framework autoregressive does not mean its images are generated only by categorical next-token prediction. See the report’s introduction and model design.

The Hunyuan example is particularly instructive: the report explicitly combines next-token language modeling and diffusion-based image modeling. “LLM-based” and “diffusion-based” can both describe aspects of the same system. Official repository.

Open weights mean that parameters are available under stated terms. They do not imply that training data, the full training pipeline, or unrestricted usage rights are available. A repository’s code license is also not automatically its checkpoint license; the linked release pages identify the relevant artifacts.

3.2 Video models: time adds modeling and systems choices

Release Publicly documented components Technical implication
Wan 2.2 A14B High-noise and low-noise experts, about 27B total and 14B active parameters per denoising step. Routing by noise level is different from routing each token among feed-forward experts in an LLM. The 5B dense TI2V model is a separate variant.
HunyuanVideo, original release A causal 3D VAE, an LLM-based text encoder, and a dual-stream-to-single-stream Transformer. Latent compression, prompt representation, and attention structure affect different parts of the pipeline.
HunyuanVideo 1.5 An 8.3B DiT, a 3D causal VAE, selective/sliding-tile attention, and a separate super-resolution network. An advertised output resolution can involve additional processing; it is not necessarily the native resolution of the base generator.
Mochi 1 A 10B asymmetric diffusion Transformer, an asymmetric video VAE, and T5-XXL conditioning. Joint multimodal attention does not require equal text and video stream dimensions or an LLM to replace T5.

A causal video autoencoder constrains how its encoder or decoder uses temporal context. It does not, by itself, imply that the generative Transformer samples frames autoregressively. Likewise, “14B active” describes computation through the active expert; storing weights, activations, attention state, and other components determines memory use.

To compare video systems, the useful unit is a complete generation setting: output length, resolution, frame rate, conditioning inputs, model variant, precision, offloading, and hardware. Model size or denoising steps alone cannot establish speed or memory requirements.

3.3 What public results can and cannot tell us

For a closed service, separate the published evaluation and supported features from the implementation details that its developer actually discloses. A convincing image, a reasoning interface, or an API model name cannot establish whether the visual generator is autoregressive, diffusion-based, or hybrid. Architectural claims require model-specific evidence.

Open-versus-closed quality claims need comparable evaluation protocols too. A class-conditional ImageNet FID, a text-rendering score, a video benchmark aggregate, and a human-preference ranking answer different questions. None yields a universal ordering of visual generators. Even a vendor’s evaluation can concern a different checkpoint from the released one: the original HunyuanVideo repository explicitly distinguishes its evaluated high-quality version from its released fast version. Evaluation details.


Outlook — questions worth keeping open

How much training should replace inference? Better solvers, distillation, consistency training, average-velocity learning, and direct generators spend compute differently. A convincing comparison should include training cost, sampling quality, controllability, and end-to-end latency. Small-benchmark success is evidence to investigate scaling, rather than proof that one objective will replace all others.

Which path and coupling make learning easiest? Short conditional paths alone do not settle regression difficulty or numerical error. The Gaussian example in §1.4 shows why the actual learned field must be examined.

How should conditioning strength be controlled? Guidance changes generated distributions and costs computation unless incorporated into training or another mechanism. The challenge is to characterize that trade-off for the particular sampler, rather than assume a fixed-time score identity solves it.

What would demonstrate persistent video understanding? Attractive short clips do not establish stable object identity, coherent scene state, or physical reasoning over long horizons. Those capabilities need their own evaluation, beyond per-frame appearance and aggregate video scores.

Cheat sheet

Question Relation or distinction
What does Gaussian corruption specify? \(X_t=\alpha_t x_0+\sigma_t\varepsilon\) specifies time marginals; the temporal coupling still matters.
What does optimal noise regression learn? \(\varepsilon^*(x,t)=\mathbb E[\varepsilon\mid X_t=x]\).
How is the score recovered? \(s_t(x)=-\varepsilon^*(x,t)/\sigma_t\) for independent Gaussian corruption and \(\sigma_t>0\).
What is the probability-flow drift? \(f-\tfrac12g^2s_t\) for the state-independent scalar diffusion of §1.2.
What does flow matching learn? \(b_t(x)=\mathbb E[\dot X_t\mid X_t=x]\) for the specified interpolant.
Is diffusion v the rectified-flow target? In general, no: \(v^{\mathrm{VP}}=\alpha_t\varepsilon-\sigma_t x_0\), whereas the linear-path target is \(\varepsilon-x_0\).
What is a finite-interval update? \(\Phi_{r\leftarrow t}(x)=x-(t-r)u(x,r,t)\) for the exact average velocity.
Does low step count prove low latency? No; count model evaluations, guidance work, decoding, and hardware costs.

Appendix A — Worked derivations

A.1 The DDPM ELBO and the simplified loss

With the forward chain as a variational distribution, the negative log-likelihood has the bound

\[-\log p_\theta(x_0)\leq\mathcal L_{\mathrm{VLB}}(x_0)=\mathbb E_{q(x_{1:T}\mid x_0)}\left[\log\frac{q(x_{1:T}\mid x_0)}{p_\theta(x_{0:T})}\right].\]

Factoring the chain backward gives

\[\begin{aligned} \mathcal L_{\mathrm{VLB}}(x_0) &=D_{\mathrm{KL}}(q(x_T\mid x_0)\|p(x_T))\\ &\quad+\sum_{k=2}^T\mathbb E_{q(x_k\mid x_0)}D_{\mathrm{KL}}(q(x_{k-1}\mid x_k,x_0)\|p_\theta(x_{k-1}\mid x_k))\\ &\quad-\mathbb E_{q(x_1\mid x_0)}\log p_\theta(x_0\mid x_1). \end{aligned}\]

For fixed reverse variance \(\rho_k^2 I\) and the noise parameterization

\[\mu_\theta(x_k,k)=\frac{1}{\sqrt{a_k}}\left(x_k-\frac{\beta_k}{\sqrt{1-\bar a_k}}\varepsilon_\theta(x_k,k)\right),\]

the parameter-dependent part of each intermediate KL is

\[\frac{\beta_k^2}{2\rho_k^2a_k(1-\bar a_k)}\|\varepsilon-\varepsilon_\theta(x_k,k)\|^2.\]

Variance-dependent terms are constant only when the variances are fixed. The endpoint reconstruction and prior terms remain in the bound. Dropping the time-dependent weights produces the simplified denoising objective; it is not exactly the original ELBO. DDPM, Sections 3.2–3.4.

A.2 Why a noise predictor estimates the marginal score

Differentiate the Gaussian mixture from §1.1:

\[\begin{aligned} \nabla_x\log p_t(x) &=\frac{\int \nabla_x q_t(x\mid x_0)p_{\mathrm{data}}(x_0)\,dx_0}{p_t(x)}\\ &=\mathbb E\left[\nabla_x\log q_t(x\mid x_0)\mid X_t=x\right]\\ &=-\frac{\mathbb E[\varepsilon\mid X_t=x]}{\sigma_t}. \end{aligned}\]

The second equality uses Bayes’ rule and differentiation under the integral. Squared-error regression onto sampled noise has precisely this conditional mean as its optimum. Rearranging \(x=\alpha_t\mathbb E[x_0\mid x]+\sigma_t\mathbb E[\varepsilon\mid x]\) also yields

\[\mathbb E[x_0\mid X_t=x]=\frac{x+\sigma_t^2s_t(x)}{\alpha_t}.\]

Both identities concern optimal conditional means, not recovery of the particular training sample from every corrupted observation.

A.3 When the Gaussian interpolant velocity equals the PF-ODE drift

From the independent interpolant,

\[b_t(x)=\dot\alpha_t\mathbb E[x_0\mid x]+\dot\sigma_t\mathbb E[\varepsilon\mid x].\]

Substitute A.2 to obtain

\[b_t(x)=\frac{\dot\alpha_t}{\alpha_t}x+\left(\frac{\dot\alpha_t}{\alpha_t}\sigma_t^2-\sigma_t\dot\sigma_t\right)s_t(x).\]

If \(f_t=\dot\alpha_t/\alpha_t\) and \(g_t^2=2\sigma_t\dot\sigma_t-2f_t\sigma_t^2\geq0\) define a compatible linear SDE on the interval of interest, this becomes \(b_t=f_tx-\tfrac12g_t^2s_t\).

Independently, the Fokker–Planck equation for that SDE is

\[\partial_t p_t=-\nabla\!\cdot(f_t x p_t)+\frac12g_t^2\Delta p_t=-\nabla\!\cdot\left[p_t\left(f_t x-\frac12g_t^2\nabla\log p_t\right)\right].\]

This verifies that the identified velocity generates the required marginals, assuming suitable boundary behavior and well-posed dynamics. It does not establish uniqueness among all velocities with those marginals. A finite-time pure-noise endpoint may also make the linear SDE coefficients singular even when the interpolant itself is well-defined.

A.4 Conditional flow matching as conditional-mean regression

Let \(b_t(X_t)=\mathbb E[U_t\mid X_t]\). For each time, expanding a square and conditioning gives

\[\mathbb E\|b_\theta(X_t,t)-U_t\|^2=\mathbb E\|b_\theta(X_t,t)-b_t(X_t)\|^2+\mathbb E\|U_t-b_t(X_t)\|^2.\]

The cross term vanishes because \(\mathbb E[U_t-b_t(X_t)\mid X_t]=0\). The last term has no dependence on \(\theta\) when the interpolant and coupling are fixed. Integrating with the same time weighting proves equality of the conditional and marginal loss gradients.

For a smooth, compactly supported test function \(\psi\),

\[\frac{d}{dt}\mathbb E[\psi(X_t)]=\mathbb E[\nabla\psi(X_t)\cdot U_t]=\int\nabla\psi(x)\cdot b_t(x)p_t(x)\,dx.\]

Integration by parts gives the continuity equation in weak form. This explains both why conditional velocity targets suffice and why their conditional average, rather than each individual target, governs the marginal flow.

A.5 Average velocity and a finite-time transition

For a well-defined ODE flow, \(Z_t-Z_r=(t-r)u(Z_t,r,t)\). Holding \(r\) fixed, differentiate along the same trajectory:

\[b_t(Z_t)=u(Z_t,r,t)+(t-r)\left[\partial_tu+(b_t\cdot\nabla_x)u\right](Z_t,r,t).\]

Rearrangement gives the identity in §1.7. The directional derivative is a Jacobian-vector product, and the diagonal limit is \(u(x,t,t)=b_t(x)\) when continuous. A trained network approximates this object; satisfying a noisy empirical objective does not make every finite jump exact.

A.6 Why a fixed-time guidance identity is not a sampling theorem

Consider a one-dimensional additive-noise process with noise variance \(\nu\). Let the unconditional and conditional data distributions be Gaussian with zero mean and variances two and one. Their noised variances are \(2+\nu\) and \(1+\nu\).

At CFG scale \(\gamma=2\), the tilted density from §1.6 is Gaussian with variance

\[V(\nu)=\left(\frac{2}{1+\nu}-\frac{1}{2+\nu}\right)^{-1}=\nu+\frac{2}{\nu+3}.\]

At zero noise it has variance \(2/3\). Forward noising that tilted endpoint would instead produce variance \(\nu+2/3\). The two paths disagree for \(\nu>0\). Thus a score that equals the tilted score at every time need not be the score path obtained by noising the tilted endpoint under the original process. One must analyze the guided dynamics to identify their output distribution.


References and further reading

Sources are linked beside the claims they support. For a longer derivation of the core frameworks:

Cite this post

@article{zheng2026noise,
  title   = "Diffusion and Flow Matching: A Field Guide",
  author  = "Zheng, Amber Yijia",
  journal = "amberyzheng.com",
  year    = "2026",
  month   = "Jun",
  url     = "https://www.amberyzheng.com/blog/from-noise-to-data/"
}