PAPER KEY: U5HFHTLE
TITLE: Mean Flows for One-step Generative Modeling
AUTHORS: Geng, Zhengyang; Deng, Mingyang; Bai, Xingjian; Kolter, J. Zico; He, Kaiming

arXiv:2505.13447v1 [cs.LG] 19 May 2025
Mean Flows for One-step Generative Modeling
Zhengyang Geng1∗ Mingyang Deng2 Xingjian Bai2 J. Zico Kolter1 Kaiming He2
1CMU 2MIT
Abstract
We propose a principled and effective framework for one-step generative modeling. We introduce the notion of average velocity to characterize flow fields, in contrast to instantaneous velocity modeled by Flow Matching methods. A well-defined identity between average and instantaneous velocities is derived and used to guide neural network training. Our method, termed the MeanFlow model, is self-contained and requires no pre-training, distillation, or curriculum learning. MeanFlow demonstrates strong empirical performance: it achieves an FID of 3.43 with a single function evaluation (1-NFE) on ImageNet 256×256 trained from scratch, significantly outperforming previous state-of-the-art one-step diffusion/flow models. Our study substantially narrows the gap between one-step diffusion/flow models and their multi-step predecessors, and we hope it will motivate future research to revisit the foundations of these powerful models.
235 236 237 238 239 240
Training Compute (GFLOPs, log-scale)
0
5
10
15
20
25
30
35
1-step FID
MF-B MF-M
iCT-XL
Shortcut-XL
IMM-XL
MF-L MF-XL
B: 131M M: 308M
L: 459M
XL: 675M Figure 1: One-step generation on ImageNet 256×256 from scratch. Our MeanFlow (MF) model achieves significantly better generation quality than previous state-of-the-art one-step diffusion/flow methods. Here, iCT [43], Shortcut [13], and our MF are all 1-NFE generation, while IMM’s 1-step result [52] involves 2-NFE guidance. Detailed numbers are in Tab. 2. Images shown are generated by our 1-NFE model.
1 Introduction
The goal of generative modeling is to transform a prior distribution into the data distribution. Flow Matching [28, 2, 30] provides an intuitive and conceptually simple framework for constructing flow paths that transport one distribution to another. Closely related to diffusion models [42, 44, 19], Flow Matching focuses on the velocity fields that guide model training. Since its introduction, Flow Matching has seen widespread adoption in modern generative modeling [11, 33, 35].
Both Flow Matching and diffusion models perform iterative sampling during generation. Recent research has paid significant attention to few-step—and in particular, one-step, feedforward—generative models. Pioneering this direction, Consistency Models [46, 43, 15, 31] introduce a consistency constraint to network outputs for inputs sampled along the same path. Despite encouraging results, the consistency constraint is imposed as a property of the network’s behavior, while the properties of the underlying ground-truth field that should guide learning remain unknown. Consequently, training can be unstable and requires a carefully designed “discretization curriculum” [46, 43, 15] to progressively constrain the time domain.
∗Work partly done when visiting MIT.


In this work, we propose a principled and effective framework, termed MeanFlow, for one-step generation. The core idea is to introduce a new ground-truth field representing the average velocity, in contrast to the instantaneous velocity typically modeled in Flow Matching. Average velocity is defined as the ratio of displacement to a time interval, with displacement given by the time integral of the instantaneous velocity. Solely originated from this definition, we derive a well-defined, intrinsic relation between the average and instantaneous velocities, which naturally serves as a principled basis for guiding network training.
Building on this fundamental concept, we train a neural network to directly model the average velocity field. We introduce a loss function that encourages the network to satisfy the intrinsic relation between average and instantaneous velocities. No extra consistency heuristic is needed. The existence of the ground-truth target field ensures that the optimal solution is, in principle, independent of the specific network, which in practice can lead to more robust and stable training. We further show that our framework can naturally incorporate classifier-free guidance (CFG) [18] into the target field, incurring no additional cost at sampling time when guidance is used.
Our MeanFlow Models demonstrate strong empirical performance in one-step generative modeling. On ImageNet 256×256 [7], our method achieves an FID of 3.43 using 1-NFE (Number of Function Evaluations) generation. This result significantly outperforms previous state-of-the-art methods in its class by a relative margin of 50% to 70% (Fig. 1). In addition, our method stands as a selfcontained generative model: it is trained entirely from scratch, without any pre-training, distillation, or curriculum learning. Our study largely closes the gap between one-step diffusion/flow models and their multi-step predecessors, and we hope it will inspire future work to reconsider the foundations of these powerful models.
2 Related Work
Diffusion and Flow Matching. Over the past decade, diffusion models [42, 44, 19, 45] have been developed into a highly successful framework for generative modeling. These models progressively add noise to clean data and train a neural network to reverse this process. This procedure involves solving stochastic differential equations (SDE), which is then reformulated as probability flow ordinary differential equations (ODE) [45, 22]. Flow Matching methods [28, 2, 30] extend this framework by modeling the velocity fields that define flow paths between distributions. Flow Matching can also be viewed as a form of continuous-time Normalizing Flows [36].
Few-step Diffusion/Flow Models. Reducing sampling steps has become an important consideration from both practical and theoretical perspectives. One approach is to distill a pre-trained many-step diffusion model into a few-step model, e.g., [39, 14, 41] or score distillation [32, 50, 53]. Early explorations into training few-step models [46] are built upon the evolution of distillation-based methods. Meanwhile, Consistency Models [46] are developed as a standalone generative model that does not require distillation. These models impose consistency constraints on network outputs at different time steps, encouraging them to produce the same endpoints along the trajectory. Various consistency models and training strategies [46, 43, 15, 31, 49] have been investigated.
In recent work, several methods have focused on characterizing diffusion-/flow-based quantities with respect to two time-dependent variables. In [3], a Flow Map is defined as the integral of the flow between two time steps, with several forms of matching losses developed for learning. In comparison to the average velocity our method is based on, the Flow Map corresponds to displacement. Shortcut Models [13] introduce a self-consistency loss function in addition to Flow Matching, which captures relationships between the flows at different discrete time intervals. Inductive Moment Matching [52] models the self-consistency of stochastic interpolants at different time steps.
3 Background: Flow Matching
Flow Matching [28, 30, 1] is a family of generative models that learn to match the flows, represented by velocity fields, between two probabilistic distributions. Formally, given data x ∼ pdata(x) and prior ε ∼ pprior(ε), a flow path can be constructed as zt = atx + btε with time t, where at and bt are
predefined schedules. The velocity vt is defined as vt = zt′ = a′tx + b′tε, where ′ denotes the time
derivative. This velocity is referred to as the conditional velocity in [28], denoted by vt = vt(zt | x).
See Fig. 2 left. A commonly used schedule is at = 1 − t and bt = t, which leads to vt = ε − x.
2


vt
zt
v(zt, t)
Figure 2: Velocity fields in Flow Matching [28]. Left: conditional flows [28]. A given zt can arise from different (x, ε) pairs, resulting in different conditional velocities vt. Right: marginal flows [28], obtained by marginalizing over all possible conditional velocities. The marginal velocity field serves as the underlying ground-truth field for network training. All velocities shown here are essentially instantaneous velocities. Illustration follows [12]. (Gray dots: samples from prior; red dots: samples from data.)
Because a given zt and its vt can arise from different x and ε, Flow Matching essentially models the expectation over all possibilities, called the marginal velocity [28] (Fig. 2 right):
v(zt, t) ≜ Ept(vt|zt)[vt]. (1)
A neural network vθ parameterized by θ is learned to fit the marginal velocity field: LFM(θ) =
Et,pt(zt)∥vθ(zt, t) − v(zt, t)∥2. Although computing this loss function is infeasible due to the marginalization in Eq. (1), it is proposed to instead evaluate the conditional Flow Matching loss [28]: LCFM(θ) = Et,x,ε∥vθ(zt, t) − vt(zt | x)∥2, where the target vt is the conditional velocity.
Minimizing LCFM is equivalent to minimizing LFM [28].
Given a marginal velocity field v(zt, t), samples are generated by solving an ODE for zt:
d
dt zt = v(zt, t) (2)
starting from z1 = ε ∼ pprior. The solution can be written as: zr = zt − R t
r v(zτ , τ )dτ , where
we use r to denote another time step. In practice, this integral is approximated numerically over discrete time steps. For example, the Euler method, a first-order ODE solver, computes each step as: zti+1 = zti + (ti+1 − ti)v(zti , ti). Higher-order solvers can also be applied.
It is worth noting that even when the conditional flows are designed to be straight (“rectified") [28, 30], the marginal velocity field (Eq. (1)) typically induces a curved trajectory. See Fig. 2 for illustration. We also emphasize that this non-straightness is not only a result of neural network approximation, but rather arises from the underlying ground-truth marginal velocity field. When applying coarse discretizations over curved trajectories, numerical ODE solvers lead to inaccurate results.
4 MeanFlow Models
4.1 Mean Flows
The core idea of our approach is to introduce a new field representing average velocity, whereas the velocity modeled in Flow Matching represents the instantaneous velocity.
Average Velocity. We define average velocity as the displacement between two time steps t and r (obtained by integration) divided by the time interval. Formally, the average velocity u is:
u(zt, r, t) ≜ 1
t−r
Zt
r
v(zτ , τ )dτ. (3)
To emphasize the conceptual difference, throughout this paper, we use the notation u to denote average velocity, and v to denote instantaneous velocity. u(zt, r, t) is a field that is jointly dependent on (r, t). The field of u is illustrated in Fig. 3. Note that in general, the average velocity u is the result of a functional of the instantaneous velocity v: that is, u = F[v] ≜ 1
t−r
Rt
r vdτ . It is a field induced
by v, not depending on any neural network. Conceptually, just as the instantaneous velocity v serves as the ground-truth field in Flow Matching, the average velocity u in our formulation provides an underlying ground-truth field for learning.
By definition, the field of u satisfies certain boundary conditions and “consistency” constraints (generalizing the terminology of [46]). As r→t, we have: limr→t u = v. Moreover, a form of “consistency" is naturally satisfied: taking one larger step over [r, t] is “consistent" with taking two smaller consecutive steps over [r, s] and [s, t], for any intermediate time s. To see this, observe that (t − r)u(zt, r, t) = (s − r)u(zs, r, s) + (t − s)u(zt, s, t), which follows directly from the additivity
3


t
r u(z, r, t)
(t−r)u(z, r, t)
t = 0.5
u(z, r, t)
t = 0.7
u(z, r, t)
t = 1.0
u(z, r, t)
v
Figure 3: The field of average velocity u(z, r, t). Leftmost: While the instantaneous velocity v determines the tangent direction of the path, the average velocity u(z, r, t), defined in Eq. (3), is generally not aligned with v. The average velocity is aligned with the displacement, which is (t − r)u(z, r, t). Right three subplots: The field u(z, r, t) is conditioned on both r and t, and is shown here for t = 0.5, 0.7, and 1.0.
of the integral: R t
r vdτ = R s
r vdτ + R t
s vdτ . Thus, a network that accurately approximates the true u
is expected to satisfy the consistency relation inherently, without the need for explicit constraints.
The ultimate aim of our MeanFlow model will be to approximate the average velocity using a neural network uθ(zt, r, t). This has the notable advantage that, assuming we approximate this quantity accurately, we can approximate the entire flow path using a single evaluation of uθ(ε, 0, 1). In other words, and as we will also demonstrate empirically, the approach is much more amenable to single or few-step generation, as it does not need to explicitly approximate a time integral at inference time, which was required when modeling instantaneous velocity. However, directly using the average velocity defined by Eq. (3) as ground truth for training a network is intractable, as it requires evaluating an integral during training. Our key insight is that the definitional equation of average velocity can be manipulated to construct an optimization target that is ultimately amenable to training, even when only the instantaneous velocity is accessible.
The MeanFlow Identity. To have a formulation amenable to training, we rewrite Eq. (3) as:
(t − r)u(zt, r, t) =
Zt
r
v(zτ , τ )dτ. (4)
Now we differentiate both sides with respect to t, treating r as independent of t. This leads to:
d
dt (t − r)u(zt, r, t) = d
dt
Zt
r
v(zτ , τ )dτ =⇒ u(zt, r, t) + (t − r) d
dt u(zt, r, t) = v(zt, t), (5)
where the manipulation of the left hand side employs the product rule and the right hand side uses the fundamental theorem of calculus2. Rearranging terms, we obtain the identity:
u(zt, r, t)
| {z }
average vel.
= v(zt, t)
| {z }
instant. vel.
−(t − r) d
dt u(zt, r, t)
| {z }
time derivative
(6)
We refer to this equation as the “MeanFlow Identity", which describes the relation between v and u. It is easy to show that Eq. (6) and Eq. (4) are equivalent (see Appendix B.3).
The right hand side of Eq. (6) provides a “target" form for u(zt, r, t), which we will leverage to construct a loss function to train a neural network. To serve as a suitable target, we must also further decompose the time derivative term, which we discuss next.
Computing Time Derivative. To compute the d
dt u term in Eq. (6), note that d
dt denotes a total
derivative, which can be expanded in terms of partial derivatives:
d
dt u(zt, r, t) = dzt
dt ∂zu + dr
dt ∂ru + dt
dt ∂tu. (7)
With dzt
dt = v(zt, t) (see Eq. (2)), dr
dt = 0, and dt
dt = 1, we have another relation between u and v:
d
dt u(zt, r, t) = v(zt, t)∂zu + ∂tu, (8)
2If r depends on t, the Leibniz rule [26] gives: d
dt
Rt
r v(zτ , τ )dτ = v(zt, t) − v(zr, r) dr
dt .
4


This equation shows that the total derivative is given by the Jacobian-vector product (JVP) between [∂zu, ∂ru, ∂tu] (the Jacobian matrix of the function u) and the tangent vector [v, 0, 1]. In modern libraries, this can be efficiently computed by the jvp interface, such as torch.func.jvp in PyTorch or jax.jvp in JAX, which we discuss later.
Training with Average Velocity. Up to this point, the formulations are independent of any network parameterization. We now introduce a model to learn u. Formally, we parameterize a network uθ and encourage it to satisfy the MeanFlow Identity (Eq. (6)). Specifically, we minimize this objective:
L(θ) = E uθ(zt, r, t) − sg(utgt) 2
2, (9)
where utgt = v(zt, t) − (t − r) (v(zt, t)∂zuθ + ∂tuθ) , (10)
The term utgt serves as the effective regression target, which is driven by Eq. (6). This target uses the instantaneous velocity v as the only ground-truth signal; no integral computation is needed. While the target should involve derivatives of u (that is, ∂u), they are replaced by their parameterized counterparts (that is, ∂uθ). In the loss function, a stop-gradient (sg) operation is applied on the target utgt, following common practice [46, 43, 15, 31, 13]: in our case, it eliminates the need for “double backpropagation” through the Jacobian-vector product, thereby avoiding higher-order optimization. Despite these practices for optimizability, if uθ were to achieve zero loss, it is easy to show that it would satisfy the MeanFlow Identity (Eq. (6)), and thus satisfy the original definition (Eq. (3)).
The velocity v(zt, t) in Eq. (10) is the marginal velocity in Flow Matching [28] (see Fig. 2 right). We follow [28] to replace it with the conditional velocity (Fig. 2 left). With this, the target is:
utgt = vt − (t − r) vt∂zuθ + ∂tuθ . (11)
Recall that vt = a′tx + b′tε is the conditional velocity [28], and by default, vt = ε − x.
Pseudocode for minimizing the loss function Eq. (9) is presented in Alg. 1. Overall, our method is conceptually simple: it behaves similarly to Flow Matching, with the key difference that the matching target is modified by −(t−r) (vt∂zuθ + ∂tuθ), arising from our consideration of the average velocity. In particular, note that if we were to restrict to the condition t = r, then the second term vanishes, and the method would exactly match standard Flow Matching.
Algorithm 1 MeanFlow: Training.
Note: in PyTorch and JAX, jvp returns the function output and JVP.
# fn(z, r, t): function to predict u # x: training batch
t, r = sample_t_r() e = randn_like(x)
z = (1 - t) * x + t * e v=e-x
u, dudt = jvp(fn, (z, r, t), (v, 0, 1))
u_tgt = v - (t - r) * dudt error = u - stopgrad(u_tgt)
loss = metric(error)
Algorithm 2 MeanFlow: 1-step Sampling
e = randn(x_shape) x = e - fn(e, r=0, t=1)
In Alg. 1, the jvp operation is highly efficient. In essence, computing d
dt u via jvp requires only
a single backward pass, similar to standard backpropagation in neural networks. Because d
dt u is
part of the target utgt and thus subject to stopgrad (w.r.t. θ), the backpropagation for neural network optimization (w.r.t. θ) treats d
dt u as a constant,
incurring no higher-order gradient computation. Consequently, jvp introduces only a single extra backward pass, and its cost is comparable to that of backpropagation. In our JAX implementation of Alg. 1, the overhead is less than 20% of the total training time (see appendix).
Sampling. Sampling using a MeanFlow model is performed simply by replacing the time integral with the average velocity:
zr = zt − (t − r)u(zt, r, t) (12)
In the case of 1-step sampling, we simply have z0 = z1 − u(z1, 0, 1), where z1 = ε ∼ pprior(ε). Alg. 2 provides the pseudocode. Although onestep sampling is the main focus on this work, we emphasize that few step sampling is also straightforward given this equation.
Relation to Prior Work. While related to previous one-step generative models [46, 43, 15, 31, 49, 23, 13, 52], our method provides a more principled framework. At the core of our method is the
5


functional relationship between two underlying fields v and u, which naturally leads to the MeanFlow Identity that u must satisfy (Eq. (6)). This identity does not depend on the introduction of neural networks. In contrast, prior works typically rely on extra consistency constraints, imposed on the behavior of the neural network. Consistency Models [46, 43, 15, 31] are focused on paths anchored at the data side: in our notations, this corresponds to fixing r ≡ 0 for any t. As a result, Consistency Models are conditioned on a single time variable, unlike ours. On the other hand, the Shortcut [13] and IMM [52] models are conditioned on two time variables: they introduce additional two-time self-consistency constraints. In contrast, our method is solely driven by the definition of average velocity, and the MeanFlow Identity (Eq. (6)) used for training is naturally derived from this definition, with no extra assumption.
4.2 Mean Flows with Guidance
Our method naturally supports classifier-free guidance (CFG) [18]. Rather than naïvely applying CFG at sampling time, which would double NFE, we treat CFG as a property of the underlying ground-truth fields. This for