Flow Matching and Rectified Flow vs Diffusion Models: How Modern Generative Models Sample (2026)
Most people who read “diffusion model” today are actually looking at something else. The text-to-image systems that defined the last two years of generative AI, including Stable Diffusion 3 and the FLUX family, are trained with a regression target that is not the classic denoising objective. They learn a velocity field, and they generate by integrating an ordinary differential equation. The training recipe behind this is called flow matching, and its most popular special case is rectified flow.
This matters now because the shift quietly changes everything an engineer touches: the loss, the noise schedule, the sampler, the number of function evaluations, and how guidance and distillation are applied. It also reaches beyond images into robot control policies and protein structure generation. Many tutorials still explain the old picture.
You will leave with a first-principles derivation that connects the forward noising SDE, score matching, the probability-flow ODE and flow matching in one frame. You will also get a runnable toy implementation and a decision table.
What this covers: the diffusion baseline, the flow matching objective, rectified flow and reflow, samplers and few-step methods, guidance, where the approach is deployed, and the failure modes that remain.
Context and Background
Diffusion models entered the mainstream with denoising diffusion probabilistic models (DDPM) by Ho, Jain and Abbeel in 2020. The recipe was simple to state. Corrupt data with a fixed schedule of Gaussian noise, train a network to undo one step of the corruption, then sample by running the learned reversal from pure noise. Song and colleagues then unified this view with stochastic differential equations in “Score-Based Generative Modeling through Stochastic Differential Equations” (arXiv 2011.13456). Their framework showed that the same trained network can be used either in a stochastic reverse SDE or in a deterministic probability-flow ODE.
That deterministic view planted the seed of flow matching. If sampling is just integrating an ODE, then the training objective might be chosen directly for the ODE’s vector field rather than inherited from noise prediction. Continuous normalizing flows (CNFs) had followed this logic earlier, but they were trained by maximum likelihood, which requires simulating the ODE and differentiating through it at every step. That made them expensive to scale.
In late 2022 three groups published closely related answers. Lipman and colleagues introduced Flow Matching for Generative Modeling (arXiv 2210.02747). Liu, Gong and Liu introduced rectified flow (arXiv 2209.03003). Albergo and Vanden-Eijnden proposed stochastic interpolants (arXiv 2209.15571). All three regress a vector field on simple, hand-built paths between noise and data, without simulating anything during training. The Lipman et al. paper states the claim directly: training is simulation-free, existing diffusion paths are special cases, and non-diffusion paths such as optimal transport displacement interpolation are possible.
Adoption followed in production. Stability AI’s “Scaling Rectified Flow Transformers for High-Resolution Image Synthesis” (arXiv 2403.03206) reports a large-scale study in which a rectified flow formulation with improved noise sampling outperforms established diffusion formulations for high-resolution text-to-image synthesis. That paper underpins Stable Diffusion 3. Black Forest Labs describes FLUX.1 as a rectified flow transformer, and the FLUX.1 dev model is listed by hosting providers as a 12B-parameter model of that type. If you want the architecture-and-benchmarks view of that model, see our FLUX image generation model deep dive.
The original thesis of this post is a framing that top tutorials tend to skip. Flow matching and diffusion are not rivals at the level of mathematics. For Gaussian paths they describe the same family of probability paths, and the network output is related to the score by a linear, time-dependent change of variables. What differs is the engineering parameterization: what the network predicts, how time is weighted and sampled, and which solver sees the result. That is why the practical gains show up in training stability and sampler behavior rather than in a fundamentally different model class.
The Core Argument: One Probability Path, Two Parameterizations

Figure 1: Diffusion and flow matching share the same noise-to-data transport. They differ in the quantity the network predicts and in the sampler that consumes it.
Figure 1 shows the two pipelines side by side. Both begin with a data distribution and a tractable noise distribution, and both end with an ODE or SDE integrated from noise to data. The difference lies in the middle box: a score or noise predictor on the left, a velocity predictor on the right.
Direct answer. Flow matching trains a neural network to predict the velocity that moves a noisy sample toward data along a chosen probability path, using a plain mean squared error loss. At inference the network’s velocity is integrated by an ODE solver from noise to a sample. Diffusion models instead learn the score, or an equivalent noise estimate, and sample with a reverse SDE or probability-flow ODE.
The diffusion baseline: forward SDE, score, and probability-flow ODE
A diffusion model starts with a forward process written as an SDE, dx = f(x, t) dt + g(t) dw, where w is Brownian motion. For the widely used variance-preserving form, f(x, t) = -0.5 beta(t) x and g(t) = sqrt(beta(t)). The forward process has a marginal p_t(x) at every time, and for Gaussian corruption it has a closed-form conditional: x_t = alpha_t x_0 + sigma_t eps, with eps drawn from a standard normal. Here x_0 denotes clean data in this convention, alpha_t shrinks the signal and sigma_t grows the noise.
Anderson’s classic time-reversal result, used by Song et al., says the reverse process is also an SDE: dx = [f(x, t) – g(t)^2 grad log p_t(x)] dt + g(t) dw-bar. The unknown piece is the score, grad log p_t(x). Everything in diffusion training is an effort to estimate it.
The same marginals p_t are also produced by a deterministic ODE, the probability-flow ODE: dx = [f(x, t) – 0.5 g(t)^2 grad log p_t(x)] dt. No randomness is injected, so a given starting noise maps to a single output. This ODE is the bridge to flow matching, because it is already a velocity field, namely f minus half g squared times the score.
Score matching and why noise prediction works
Direct score matching asks a network s_theta(x, t) to approximate grad log p_t(x), but p_t is unknown. Vincent showed in 2011 that denoising score matching sidesteps this. For the Gaussian conditional above, the score of the conditional is exactly -eps / sigma_t, which is known in closed form. Regressing onto it gives the same gradients, up to a constant, as regressing onto the true marginal score.
DDPM’s practical loss is this identity with a convenient rescaling. The network predicts the noise eps from x_t and t, the loss is the mean squared error between predicted and true noise, and the score estimate is recovered as -eps_theta / sigma_t. Weighting across t is a free design choice, and a surprising amount of diffusion research (including the EDM work by Karras and colleagues, arXiv 2206.00364) is about choosing it well.
Two drawbacks follow from this construction. First, the noise target has awkward behavior at the ends of the schedule: at low noise, predicting eps is an ill-conditioned task because tiny errors in x_t get amplified, and at high noise the signal is almost absent. Practitioners responded with alternative targets such as v-prediction from Salimans and Ho’s progressive distillation work. Second, the discrete schedule (the beta values, the cosine schedule, zero-terminal-SNR fixes) leaks into sampler design.
Flow matching: regress the velocity of a chosen path
Flow matching starts from a different question. Instead of asking what the score is, it asks what vector field v(x, t) transports the noise distribution p_0 into the data distribution p_1 by solving dx/dt = v(x, t). If you could regress the true marginal field directly, you could sample by integrating it. The obstacle is that the marginal field is unknown, as the score was.
The Lipman et al. insight is that the marginal field is an average of conditional fields that are known. Condition on a data point x_1. Choose a simple path from noise to that point, for example a Gaussian whose mean moves toward x_1 and whose standard deviation shrinks. Along that path the velocity is known exactly. The marginal field is the posterior-weighted average of these conditional velocities, and a theorem in the paper shows the gradient of the conditional loss equals the gradient of the intractable marginal loss. This is conditional flow matching (CFM).
The simplest instance is the linear interpolant. Draw x_0 from noise, x_1 from data, and t uniformly from [0, 1]. Set x_t = (1 – t) x_0 + t x_1. The velocity of this straight line is constant: u = x_1 – x_0. The loss is
L(theta) = E over (x_0, x_1, t) of the squared norm of (v_theta(x_t, t) – (x_1 – x_0)).
That is the whole objective. It matches the rectified flow loss and the optimal-transport conditional path in Lipman et al., where the path has mean t x_1 and standard deviation 1 – (1 – sigma_min) t. With sigma_min near zero, the two coincide for practical purposes.
A note on convention. Lipman and this post place noise at t = 0 and data at t = 1. The Stable Diffusion 3 paper and many codebases flip it, with data at t = 0 and noise at t = 1. The math is the same after replacing t by 1 – t and negating the velocity. Check which direction a codebase uses before mixing checkpoints and samplers, because getting it backwards produces silent garbage rather than an error.
The bridge: velocity is a rescaled score
For any Gaussian path x_t = a_t x_1 + s_t x_0, with a_t the signal coefficient and s_t the noise coefficient, the marginal velocity can be written in terms of the score:
v(x, t) = (a’_t / a_t) x + (a’_t s_t^2 / a_t – s_t s’_t) grad log p_t(x),
where primes denote time derivatives. I derived this by substituting E[x_0 given x_t] = -s_t times the score into v = a’_t x_1 + s’_t x_0 and eliminating x_1 using x_t. The takeaway is structural. A velocity network and a noise network are linearly related at every (x, t), so a model trained for one can in principle be converted to the other by a closed-form reparameterization. This is the same fact that lets practitioners run flow-trained models through diffusion-style solvers with a time reparameterization, and vice versa.
So why does the choice matter at all? Because the loss weighting and the time sampling differ, and because the target has different variance properties. The velocity target x_1 – x_0 has comparable magnitude at every t, which is much better conditioned than noise prediction near t equal to one in the data-at-one convention. Training signal is uniform instead of exploding or vanishing at the ends.
Deeper Analysis: Training, Rectification, Samplers, and Guidance
A minimal training loop

Figure 2: One flow matching training step. No ODE is simulated during training, only a pairing, an interpolation and a regression.
Figure 2 maps the loop. Every iteration builds the training pair from scratch: draw a data batch, draw noise of the same shape, draw times, interpolate, and regress. Nothing carries over between iterations, and there is no inner solver. That is what “simulation-free” means in practice, and it is the single biggest reason the approach scaled where maximum likelihood CNFs did not.
The listing below is a minimal, self-contained implementation on a 2D two-moons style dataset. I have not executed it in the sandbox used to draft this post, which has no PyTorch, so treat it as a reference implementation to run and adapt rather than a tested artifact.
import math
import torch
import torch.nn as nn
torch.manual_seed(0)
device = "cuda" if torch.cuda.is_available() else "cpu"
def sample_moons(n, noise=0.06):
"""Two interleaving half circles, no sklearn needed."""
k = n // 2
a = torch.rand(k) * math.pi
b = torch.rand(n - k) * math.pi
upper = torch.stack([torch.cos(a), torch.sin(a)], dim=1)
lower = torch.stack([1 - torch.cos(b), 0.5 - torch.sin(b)], dim=1)
x = torch.cat([upper, lower], dim=0)
x = x + noise * torch.randn_like(x)
return (x - x.mean(0)) / x.std(0)
class VelocityNet(nn.Module):
def __init__(self, dim=2, hidden=128):
super().__init__()
self.net = nn.Sequential(
nn.Linear(dim + 1, hidden), nn.SiLU(),
nn.Linear(hidden, hidden), nn.SiLU(),
nn.Linear(hidden, hidden), nn.SiLU(),
nn.Linear(hidden, dim),
)
def forward(self, x, t):
return self.net(torch.cat([x, t], dim=1))
model = VelocityNet().to(device)
opt = torch.optim.AdamW(model.parameters(), lr=2e-3)
for step in range(6000):
x1 = sample_moons(512).to(device) # data
x0 = torch.randn_like(x1) # noise
t = torch.rand(x1.size(0), 1, device=device)
xt = (1 - t) * x0 + t * x1 # straight-line path
target = x1 - x0 # constant velocity
loss = ((model(xt, t) - target) ** 2).mean()
opt.zero_grad()
loss.backward()
opt.step()
if step % 1000 == 0:
print(step, loss.item())
@torch.no_grad()
def euler_sample(model, n=2000, steps=20):
x = torch.randn(n, 2, device=device)
dt = 1.0 / steps
for i in range(steps):
t = torch.full((n, 1), i * dt, device=device)
x = x + dt * model(x, t) # explicit Euler step
return x
samples = euler_sample(model, steps=20).cpu()
print(samples.mean(0), samples.std(0))
Three details deserve attention. The regression target is constant along each training line, but the network sees only x_t and t, so it cannot know which line it is on. It therefore learns the conditional expectation of x_1 – x_0 given x_t, which is exactly the marginal velocity. Second, the loss never reaches zero, and should not: where two training lines cross at the same point with different velocities, the irreducible variance of the target sets the floor. Third, the sampler uses a fixed grid in t with no schedule tables at all.
To see the few-step effect, call euler_sample with steps equal to 1, 2, 4 and 20 and plot the results. A one-step Euler sample collapses toward the mean of the data, which is the expected behavior of a curved flow integrated with a single straight step. Quality improves quickly as steps increase. This is my expectation from the mechanism rather than a measured result from this post.
Rectified flow and reflow: making paths straight

Figure 3: Reflow turns a trained flow into a new training set of coupled pairs, then retrains so that the trajectories become straighter.
A subtle point trips up many readers. The conditional paths are straight lines, but the marginal flow that the network learns is generally not. When lines from different (x_0, x_1) pairs cross, the network must output their average velocity at the crossing, and trajectories bend. A bent trajectory needs many small integration steps to follow accurately.
Rectified flow addresses this with an iterative procedure the authors call reflow. After training a first model v_1, simulate its ODE from fresh noise samples x_0 to obtain generated samples x_1-hat. This yields pairs that are coupled by the flow itself, so lines between them are far less likely to cross. Train a second model v_2 with the same linear-interpolation loss on these coupled pairs. Liu et al. prove that this operation reduces transport cost and straightens the flow, and that in the limit a perfectly straight flow can be integrated in a single Euler step.
The practical caveats are real. Reflow requires simulating the first model across a large synthetic dataset, which costs substantial compute. The second model learns from the first model’s outputs, so any artifacts or mode loss in model one are baked in. For large text-to-image systems, reflow is a research and distillation technique more than a default training stage; I am not aware of a public statement that a given production model used it, so treat claims on this point as unverified.
A cleaner alternative is to change the coupling during training itself. Minibatch optimal transport pairing, studied in the conditional flow matching literature (for example Tong et al., arXiv 2302.00482), matches noise and data samples inside each batch to reduce crossing. It costs a small assignment problem per batch and requires no synthetic dataset.
Time sampling and the loss weight
Uniform t is the default in the toy code, but it is rarely the best choice at scale. The SD3 paper’s central empirical claim, from its abstract, is that biasing the noise sampling toward “perceptually relevant scales” improves rectified flow. I recall this takes the form of a logit-normal distribution over t, which concentrates training on mid-range noise levels where the task is hardest; consult the paper for the exact parameters before copying them. The same paper makes the timestep schedule depend on image resolution, since a fixed amount of noise destroys less information in a larger image. Treat the exact shift formula as something to read from the paper or from your library’s scheduler config, not from memory.
The takeaway generalizes beyond images. The path fixes the target, but the distribution over t fixes where the network spends its capacity. In diffusion this was hidden in the loss weight and in the sigma schedule. In flow matching it becomes an explicit, tunable sampling distribution.
Samplers: Euler, Heun, and DPM-Solver

Figure 4: The inner loop of ODE sampling with classifier-free guidance. Each solver step costs two network passes when guidance is on.
Sampling is numerical integration, so everything from numerical analysis applies. Explicit Euler is first order and costs one network evaluation per step. Heun’s method, the second-order trapezoidal scheme used in the EDM sampler, costs two evaluations per step but has much lower local error, so it often wins at a fixed budget of function evaluations. For smooth, nearly straight trajectories, Euler with a modest step count is already effective, which is the practical dividend of rectification.
The diffusion world built specialized solvers because the probability-flow ODE has semi-linear structure: a linear term in x plus a nonlinear network term. DPM-Solver (Lu et al., arXiv 2206.00927) integrates the linear part exactly and approximates only the network part, and DPM-Solver++ adapts this for guided sampling. These solvers were designed for diffusion parameterizations. With the velocity-to-score bridge above, their ideas transfer, but a flow model with nearly straight paths gains less from them, since there is less curvature left to exploit.
Stochastic samplers also exist. Because Song et al. showed a family of SDEs shares the same marginals, you can add noise during sampling and correct with the score. Stochastic sampling can improve diversity and sometimes sample quality at higher step counts, while deterministic ODE sampling gives reproducibility and clean latent interpolation. Which to prefer depends on whether you need the invertibility of the ODE.
Classifier-free guidance on a velocity field
Classifier-free guidance (Ho and Salimans, arXiv 2207.12598) trains one network with conditioning dropped some fraction of the time, then extrapolates at sampling time between the conditional and unconditional predictions. In score form: s_guided = s_uncond + w (s_cond – s_uncond). Because velocity is an affine function of score at fixed (x, t), the same extrapolation applies directly to velocity: v_guided = v_uncond + w (v_cond – v_uncond). Figure 4 shows this inner loop. The cost is two forward passes per step, which is why guidance dominates inference spend.
The guidance scale is a quality and diversity knob, not a free lunch. High values sharpen prompt adherence but reduce diversity and can oversaturate colors. One response, which hosting pages describe as part of FLUX.1 dev, is guidance distillation: the guided output is distilled into a model that takes the guidance scale as an input, so only one pass per step is needed. The details of Black Forest Labs’ recipe are not something I verified from a primary source, so I describe the idea only.
Few-step generation: distillation, consistency, and mean flows
Even straight-ish flows are not exactly straight, and guidance bends them further. Several lines of work compress sampling into a handful of steps.
- Progressive distillation (Salimans and Ho) trains a student to match two teacher steps in one, halving the step count repeatedly.
- Consistency models (Song et al., 2023) train a network to map any point on a trajectory directly to the trajectory’s endpoint, enabling one or two step sampling.
- Adversarial or score distillation variants add a discriminator or a score-matching term to the student objective.
- Mean Flows (Geng et al., arXiv 2505.13447, NeurIPS 2025) learn the average velocity over an interval instead of the instantaneous velocity, so one network evaluation can jump across the interval.
All four sit on top of the same ODE picture. A flow-matching teacher is a convenient starting point because its trajectories are smoother, though I am not aware of a rigorous head-to-head establishing it is always the better teacher, so I flag that as an open question.
Where flow matching is used
- Text-to-image. Stable Diffusion 3 is built on rectified flow with the MMDiT transformer, which uses separate weights for the text and image modalities per the paper’s abstract. FLUX.1 is described by Black Forest Labs as a rectified flow transformer.
- Robot policies. Physical Intelligence’s pi-zero (arXiv 2410.24164) pairs a pretrained vision-language model with flow matching to produce continuous robot actions. This follows the diffusion-policy idea, which we cover in our diffusion policy for robot manipulation post. Flow matching shortens the iterative action decoding loop, which matters for control rates.
- Protein structure. Flow-based backbone generators such as FrameFlow (arXiv 2310.05297) use SE(3) flow matching, and NVIDIA’s Proteina (arXiv 2503.00710) scales flow-based protein structure generation. The same velocity regression is applied to rotations and translations on a manifold.
- Video. Meta’s Movie Gen reportedly trains with a flow matching objective; I could not confirm the details from a primary source in this session, so treat it as unverified.
The pattern across these uses is revealing. Flow matching tends to be chosen when the data live on awkward spaces (manifolds, action chunks) or when inference latency is a hard constraint.
Comparison: diffusion versus flow matching
| Aspect | Classic diffusion (DDPM style) | Flow matching and rectified flow |
|---|---|---|
| Network target | Noise eps or v-prediction | Velocity x_1 – x_0 on a chosen path |
| Underlying object | Score of a noised marginal | Vector field transporting noise to data |
| Loss | Weighted MSE, weighting is a design choice | Plain MSE, with a time sampling distribution |
| Noise schedule | Discrete or continuous beta, alpha, sigma tables | Path definition plus time sampling and shift |
| Sampling | Reverse SDE or probability-flow ODE | ODE integration, SDE variants possible |
| Typical solvers | DDIM, DPM-Solver, Heun, ancestral | Euler, Heun, midpoint, adaptive RK |
| Step count | Often tens of steps; fewer with distillation | Fewer steps possible when flow is straight; no universal number |
| Guidance | CFG on noise or score | CFG on velocity, same extrapolation |
| Distillation | Progressive, consistency, adversarial | Same methods, plus reflow and mean flows |
| Non-Euclidean data | Needs manifold score machinery | Natural extension to manifolds |
Read this table with care. The “step count” row describes tendencies, and no source I checked establishes a universal number of steps for either family. Always measure at your own resolution, solver and guidance scale.
Trade-offs, Gotchas, and What Goes Wrong
Straight conditional paths do not give straight sampling paths. The most common misconception is that rectified flow guarantees one-step sampling. It does not. Crossing lines average out and curvature remains until reflow or better coupling reduces it. A one-step Euler sample from an unrectified model is blurry, because it lands near the conditional mean.
Mode averaging is the failure signature. When you under-integrate a curved flow, samples drift toward the center of mass of the data. In 2D this looks like points filling the gap between the moons. In images it looks like soft, low-detail output. If you see this, increase steps or switch to a higher-order solver before blaming the model.
Convention mismatches are silent. Time direction (noise at 0 or at 1), sign of the velocity, and whether guidance uses (1 + w) or w differ across libraries. A mismatched scheduler produces plausible-looking but wrong images. Verify conventions on a trivial dataset before debugging anything else.
Reflow compounds errors. Training on model-generated pairs can amplify artifacts and shrink diversity over rounds. Evaluate recall and diversity, not only FID or visual quality, after each round.
Guidance and distillation interact. A guidance-distilled student fixes the guidance behavior it was trained with. You lose the ability to freely vary the scale and to use negative prompts the usual way, and the distilled model may be less diverse than its teacher.
The theory is cleaner than the benchmarks. Claims that flow matching beats diffusion are supported by specific large-scale studies, such as the SD3 comparison, but those studies change several things at once: architecture, data, noise sampling and parameterization. I know of no controlled result that isolates the objective alone as the cause of every reported gain. Be skeptical of one-line summaries, including this one.
Cost does not vanish. ODE sampling with guidance still needs two network passes per step. A flow model that needs far fewer steps changes the bill substantially, but the exact saving depends on the model and target quality, so benchmark it rather than assume it.
Practical Recommendations
Start from the use case rather than the buzzword. If you are fine-tuning an existing text-to-image checkpoint, you inherit its parameterization, and your job is to match the scheduler and time convention exactly, not to choose an objective. If you are training from scratch on a new modality, flow matching with a plain MSE loss is the lower-risk starting point, because the target is well conditioned and the code is short.
For a new project, prototype on a toy dataset first, using something like the listing above. Check that one-step, four-step and twenty-step samples behave as the mechanism predicts. This catches sign and direction bugs for free. Then move to your real data with the same loop and a stronger network.
Spend tuning effort where the leverage is. The distribution over t and the resolution shift usually matter more than the optimizer details. Hold the solver fixed while you tune the model, then tune the solver and step count on the final checkpoint. Add guidance last, and measure both quality and diversity, because the best guidance scale is task dependent.
If latency is the constraint, plan for distillation from the start. Keep a teacher checkpoint, budget for a consistency or mean-flow style student, and compare it against simply lowering the step count with a better solver. The cheaper option sometimes wins.
Checklist before you ship:
- Confirm time direction, velocity sign and guidance formula against the library you deploy with.
- Plot samples at several step counts on a toy dataset to catch convention errors.
- Evaluate diversity and prompt adherence, not only a single quality metric.
- Benchmark wall-clock latency including both guidance passes.
- Record solver, step count, guidance scale and seed with every generated artifact.
Frequently Asked Questions
What is flow matching in simple terms?
Flow matching is a way to train a generative model by regressing a velocity field. You pick a path from random noise to each training example, compute the velocity along that path, and train a network to predict it with mean squared error. At inference you start from noise and integrate the learned velocity with an ODE solver to produce a sample. Training is simulation-free, which makes it scalable.
Is flow matching better than diffusion?
It depends on what you measure. For Gaussian paths the two families are mathematically related, so the difference is mostly in parameterization, loss conditioning, time sampling and sampler behavior. Large studies such as the Stable Diffusion 3 paper report gains for rectified flow, but they change several factors at once. Treat flow matching as a strong default, not a universal winner.
What is the difference between rectified flow and flow matching?
Flow matching is the general framework: regress the velocity of a chosen conditional probability path. Rectified flow is the special case with straight-line interpolation between noise and data, plus an optional reflow procedure that retrains on coupled pairs to straighten trajectories. In practice the linear-interpolation loss in both is identical, which is why the terms are often used interchangeably.
Why does flow matching need fewer sampling steps?
The velocity target has uniform scale across time, and straighter trajectories are easier for numerical solvers to follow, so fewer steps can suffice for a given error. The effect is strongest after rectification or good minibatch coupling. It is a tendency, not a guarantee, and guidance can bend the trajectory again. Measure the quality-versus-steps curve for your own model.
Does classifier-free guidance work with flow matching?
Yes. Velocity is an affine function of the score at a fixed state and time, so the usual extrapolation applies: v_guided = v_uncond + w (v_cond – v_uncond). You train with conditioning dropout and run two passes per sampling step. Guidance distillation can fold the extra pass into a single network that takes the scale as input, at the cost of flexibility.
Which ODE solver should I use for flow matching?
Start with Euler at a moderate step count, since it is simple and works well on near-straight flows. Move to Heun or a midpoint method if you need quality at fewer steps, accepting two network evaluations per step. DPM-Solver style methods transfer through the velocity-score relation but offer less benefit when curvature is low. Choose empirically at your target budget.
Further Reading
- Diffusion policy for robot manipulation: how denoising and flow-style action generation drive imitation learning.
- FLUX image generation model architecture and benchmarks: the rectified flow transformer in detail.
- Diffusion LLMs and text diffusion architecture: applying iterative denoising to discrete text.
- Flow Matching for Generative Modeling (Lipman et al.): the foundational paper.
- Scaling Rectified Flow Transformers for High-Resolution Image Synthesis: the Stable Diffusion 3 study.
By Riju — about
