WorksComputer Science
FlowBudget: Training-Free Sampling-Budget Estimation for Flow Matching Models
Abstract
Sampling from continuous flow-based generators such as flow matching models requires numerical ODE or SDE integration, making inference cost depend on the number of function evaluations (NFEs). In practice, the sampling budget is inherited from prior work or selected through expensive FID-versus-NFE sweeps, using FID to assess image-generation quality, requiring sample generation and evaluation at multiple budgets. This makes sampling-budget selection dependent on repeated empirical evaluation. We therefore ask a complementary question to solver design and timestep allocation: for a fixed pretrained model and solver, what numerical resolution is sufficient? We introduce FLOWBUDGET, a training-free estimator of solver-relative sampling complexity. Using simulation-free interpolation probes of the learned dynamics, FLOWBUDGET normalizes the leading one-step discretization error by the motion, estimates its coefficient from interpolation probes, and maps a numerical tolerance to a step budget using the solver order. We derive estimators for numerical solvers in flow~matching sampling, namely Euler and Heun for ODE sampling and additive-noise Euler–Maruyama for SDE sampling, and connect the ODE coefficients to terminal integration error. Experiments on SiT, FlowDCN and Rectified Flow models, spanning flow-model architectures and formulations, test whether FLOWBUDGET can estimate the NFE budget without generating samples at multiple budgets or performing an FID-versus-NFE sweep. The code is available at https://github.com/Yasaman-dt/FlowBudget
Introduction
Flow matching models learn a time-dependent velocity field whose integration transports a reference law to data [1, 2, 3], and are used across image [4], audio [5, 6], and video [7] generation. At inference, generation requires numerical integration of ordinary differential equations (ODEs) or stochastic differential equations (SDEs) parameterized by the learned model [8, 9, 10, 11]. Because each integration step requires one or more neural-network evaluations, the solver and its number of function evaluations (NFEs) directly determine sampling cost. Few NFEs can produce substantial discretization error, whereas increasing NFEs reduces this error according to the convergence order of the chosen solver [12, 13, 14]. In practice, however, the number of NFEs is often inherited from a reference implementation, e.g., 250 NFEs [11, 15], or selected by trial and error based on generation quality.
Generation error can arise from both approximation error in the learned velocity field and numerical error introduced by the solver. For a fixed pretrained model, the former is fixed, so we focus on the numerical integration error. Recent methods improve sampling efficiency by changing the solver or by allocating a fixed budget nonuniformly [13, 14, 16, 17, 18, 19]. In particular, SharpEuler uses trajectory acceleration—the leading Euler local-error quantity—to decide where a prescribed Euler budget should be spent [17]. Our problem is complementary: we keep the pretrained model and solver fixed and ask how large the total budget should be. Thus, the novelty is not the use of local truncation error itself, but its use to define and estimate a solver-relative numerical sampling complexity before performing a quality-versus-NFE sweep.
We introduce FLOWBUDGET, which associates each pretrained model–solver pair with a scale-normalized numerical-complexity coefficient. Estimated from simulation-free interpolation probes, this coefficient combines with the solver order to map a prescribed relative numerical tolerance directly to a sampling-step budget. Our contributions are threefold. First, we formulate fixed-solver budget estimation as a numerical-error problem and derive a general scaling law relating a stabilized relative local-error tolerance to the required step budget. Second, we instantiate the construction for Euler and Heun ODE sampling and additive-noise Euler–Maruyama sampling, and connect the Euler/Heun differential coefficients to terminal ODE integration error under standard stability assumptions. We also distinguish the population numerical-complexity coefficient from its Monte Carlo estimate and give a finite-probe concentration guarantee. Third, across pretrained SiT, Rectified Flow, and FlowDCN models, we test whether this numerical resolution yields useful quality–cost operating points without using FID-versus-NFE sweeps to construct the estimator.
Background and Problem Formulation
Background. Flow matching learns a time-dependent velocity field for transporting samples between noise and data distributions [1]. Given data and Gaussian noise , consider the interpolant , , where the differentiable schedules satisfy and . Throughout this work, we adopt the conventional linear schedules and , as used in the literature, e.g., Rectified Flow [2], SiT [11], and FlowDCN [15]. The resulting interpolant is , with conditional velocity . A neural velocity field is trained to predict this conditional velocity by minimizing , where . At inference, generation starts from Gaussian noise and proceeds backward from to . For uniform steps, we define the time grid , , and the signed step size . We write for the numerical state at time , initialized with . For ODE sampling we integrate using Euler or Heun [12]. Euler uses the update , while Heun uses . For SDE sampling, we consider , where is a reverse-time Wiener process, is a prescribed time-dependent noise variance rate, and is the reverse-time drift. For the linear interpolant, the score is estimated from the learned velocity as [10, 11]. On the same time grid, Euler–Maruyama gives , where are independent [20].
Problem Formulation. Given a pretrained velocity field , a fixed sampling dynamics and solver , and a tolerance , we estimate the smallest uniform step budget whose leading-order mean relative local error is at most . We define relative local error as the one-step discretization error divided by a stabilized displacement scale, and estimate its mean using data-noise interpolation probes constructed from a small data subset. This yields an asymptotic budget estimate without simulating sampling trajectories.
Methodology
FLOWBUDGET estimates the sampling budget from local properties of the dynamics evaluated at interpolation probes. We construct and denote as a simulation-free surrogate for the sampler-induced state–time law. For a probe , consider a step of magnitude in the sampling direction. Let be the one-step local error between exact and numerical updates starting from the same state, and let denote the one-step displacement scale. For SDEs, these quantities use the conditional root-mean-square norm, with the exact and numerical updates sharing the same Brownian path. Their small-step expansions take the form
where , , and . Coefficients and describe the local error and motion, while the exponents determine their dependence on the step size. To measure local numerical error relative to this motion, define
The stabilization scales with the displacement, preserving the leading step-size dependence. The corresponding normalized coefficient and its probe average are
Proposition 1 (Budget scaling). Let . Suppose that, uniformly on the support of , we have , and , , for integrable leading coefficients. For sufficiently small
Accordingly, solving defines the population leading-order budget and its Monte Carlo plug-in estimate
Proof. Factor from the denominator in (3). Since and , for sufficiently small the latter term is at most . Hence the reciprocal denominator admits a uniform expansion around . Multiplication by the numerator expansion gives uniformly. Averaging under and setting yields (5); inversion of leading term and replacing by empirical mean gives (6). □
For independent probes, is a Monte Carlo estimate of . If -a.s., Hoeffding’s inequality gives, with probability at least ,
which induces a confidence interval for the unrounded leading-order budget through the monotonicity of (6).
Euler and Heun
Along an ODE trajectory, with all derivatives evaluated at , write and define
For a solver , initialized from the exact state , define the one-step error as . Taylor expansion along the exact trajectory gives
where and . Hence Euler and Heun have respectively
which yields
Euler uses one NFE per step and Heun two, so and . Here the generic coefficients in (2) specialize to and . The Euler coefficient is trajectory acceleration, also used by recent fixed-budget scheduling methods such as SharpEuler [17]; in contrast, FlowBudget uses it to estimate the total budget. Heun depends on a solver-specific third-order combination rather than acceleration alone. The same numerator coefficients also control terminal ODE discretization error. Under standard Lipschitz stability and uniform local expansions, with backward step magnitude , error propagation over a unit interval gives
If additionally , Riemann-sum convergence yields and , where . Thus the normalized coefficients control terminal error along exact sampler trajectories under this mild velocity bound. FlowBudget replaces these trajectory-time averages by interpolation-probe averages, an approximation evaluated empirically below. No implication from numerical error to FID is assumed.
Euler–Maruyama
We consider the additive-noise SDE . The following construction is a strong local-error statement: the exact and numerical one-step solutions are coupled with the same Brownian path. For , define
We formulate the local analysis in the sampler’s increasing computational-time coordinate, avoiding sign ambiguities from the backward physical-time parameterization. Let and , and let denote the Frobenius norm. The additive-noise Itô–Taylor expansion coupled to the same Brownian path yields the leading defect . Writing and , stochastic Fubini and Itô isometry give and . Therefore
The coefficient is nonnegative because . This one-step RMS defect is consistent with the order-one strong convergence of Euler–Maruyama (EM) for sufficiently regular additive-noise SDEs; it should not be confused with the generic order- strong rate for multiplicative noise. Define the EM displacement scale by . On a probe-time domain where and are bounded and , the diffusion term dominates and . Hence , , and . Proposition 1 gives
Accordingly, SDE probes are restricted to ; this excludes endpoints where vanishes or becomes singular and the above normalization/expansion may fail. Euler–Maruyama uses one drift/network evaluation per step, so . Importantly, this estimator controls a strong numerical-resolution proxy; we make no theoretical claim that its tolerance is calibrated to FID. In practice, FlowBudget draws interpolation probes , evaluates the solver coefficient in (12), (13), or (17), averages it to obtain , and applies (6); the NFE multiplier is one for Euler/EM and two for Heun.
Experiments
Experimental Setup. We evaluate FlowBudget across six pretrained models: SiT-XL/2 [11] and FlowDCN-XL/2 [15] on ImageNet [21], and RF-Unet, 1-RF, 2-RF, and 3-RF [2] on CIFAR-10 [22], using the solvers from their original works and additionally with Heun for FlowDCN. For all model–solver pairs, FlowBudget estimates the step budget from 2K interpolation probes using numerical tolerance . for the ODE solvers and for the SDE solver, with , and converts the step budget to the NFE budget. We use one tolerance within each dynamics class rather than tuning it per model. The experiment tests whether a fixed numerical tolerance yields useful budgets across architectures, not whether the tolerance is universally calibrated to perceptual quality. The predicted NFE budgets are essentially unchanged when setting . For each seed, FID is computed from 10K samples at its predicted budget. Each seed uses an independent probe set, so the reported variation reflects Monte Carlo variability in the budget estimate. Each run used an NVIDIA A100 40GB GPU.
Main Results. Figure 1a and Table 1 show that FLOWBUDGET selects budgets near the low-FID plateau of the empirical curves. For SiT, FlowDCN, and RF-UNet, using a reference NFE of 250, it reduces the sampling budget by 16.0–76.8% for SiT-XL/2, 28.8–83.2% for FlowDCN-XL/2. For the same model, the predicted budget also depends strongly on the solver: Heun requires only 58 versus 146 NFEs for SiT-XL/2 and 42 versus 150 for FlowDCN-XL/2 under the same ODE tolerance, consistent with its higher-order accuracy. The FID–NFE curves are used only retrospectively and they are not used for budget estimation. Overall, FLOWBUDGET identifies a solver-dependent quality–cost operating point rather than directly predicting FID saturation.
| Model | Solver | NFE | FID | Reference FID |
| SiT-XL/2 | ODE Euler | 16.41 | ||
| SiT-XL/2 | ODE Heun | 16.56 | ||
| SiT-XL/2 | SDE EM | 16.06 | ||
| FlowDCN-XL/2 | ODE Euler | 15.36 | ||
| FlowDCN-XL/2 | ODE Heun | 15.16 | ||
| FlowDCN-XL/2 | SDE EM | 15.42 | ||
| RF-UNet | ODE Euler | 6.59 | ||
| 1-RF | ODE Euler | 372.51 | ||
| 2-RF | ODE Euler | 16.41 | ||
| 3-RF | ODE Euler | 11.63 |
Table 1. FLOWBUDGET-predicted budgets and corresponding FID, reported as mean std over three seeds. Reference FID uses NFE for SiT-XL/2, FlowDCN-XL/2, and RF-UNet, and NFE for 1-RF, 2-RF, and 3-RF.

Figure 1. Analysis of FLOWBUDGET budget estimation.
Stability Analysis. Figure 1b shows stable NFE estimates from 1K to 20K probes with narrow 95% confidence bands, supporting use of 2K probes. As shown in Figure 1c, varying changes the estimated NFE as expected, while FID varies only modestly around the selected tolerances, indicating that the resulting operating point is robust to small changes in .
Computational Cost Analysis. For 3-RF, constructing the FID–NFE curve requires generating 10K samples at six budgets, for a total of 110.3 minutes. In contrast, FLOWBUDGET estimates NFE from 2K probes and evaluates this point, requiring 24.3 minutes. This yields a reduction in wall-clock time, saving 86.0 minutes. Since 3-RF is evaluated only up to NFE , the advantage should grow for models requiring broader NFE sweeps, where generation and FID evaluation must be repeated at additional budgets.

Figure 1a. FID versus number of function evaluations (NFE), with stars indicating the FLOWBUDGET-predicted NFE budgets.

Figure 1b. Stability of NFE versus probe count at , showing means over three seeds with shaded 95% confidence intervals.

Figure 1c. FID-10K as a function of the tolerance .
Conclusion
FLOWBUDGET estimates a fixed solver’s numerical resolution from scale-normalized local discretization error, without an NFE–quality sweep. The Euler, Heun, and additive-noise Euler–Maruyama laws are numerical statements; for ODE solvers, the normalized coefficients also control terminal integration error under a bounded-velocity assumption.
Limitations and Future Work. A limitation is that interpolation probes use training-distribution samples and only approximate the sampler trajectory law. Future work will study calibration between and perceptual metrics such as FID.
References
- [1]Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, and Matthew Le, “Flow matching for generative modeling,” in The Eleventh International Conference on Learning Representations (ICLR), 2023.arxiv.org/abs/2210.02747
- [2]Xingchao Liu, Chengyue Gong, and qiang liu, “Flow straight and fast: Learning to generate and transfer data with rectified flow,” in The Eleventh International Conference on Learning Representations (ICLR), 2023.arxiv.org/abs/2209.03003
- [3]Michael Albergo, Nicholas M Boffi, and Eric Vanden-Eijnden, “Stochastic interpolants: A unifying framework for flows and diffusions,” Journal of Machine Learning Research (JMLR), vol. 26, 2025.
- [4]Patrick Esser, Sumith Kular, Andreas Blattmann, Rahim Entezari, Jonas Müller, Harry Saini, Yam Levi, Dominik Lorenz, Axel Sauer, Frederic Boesel, et al., “Scaling rectified flow transformers for high-resolution image synthesis,” in Forty-first international conference on machine learning (ICML), 2024.arxiv.org/abs/2403.03206
- [5]Matthew Le, Apoorv Vyas, Bowen Shi, Brian Karer, Leda Sari, Rashel Moritz, Mary Williamson, Vimal Manohar, Yossi Adi, Jay Mahadeokar, et al., “Voicebox: Text-guided multilingual universal speech generation at scale,” Advances in neural information processing systems (NeurIPS), 2023.arxiv.org/abs/2306.15687
- [6]Apoorv Vyas, Bowen Shi, Matthew Le, Andros Tjandra, Yi-Chiao Wu, Baishan Guo, Jiemin Zhang, Xinyue Zhang, Robert Adkins, William Ngan, et al., “Audiobox: Unified audio generation with natural language prompts,” arXiv preprint arXiv:2312.15821, 2023.arxiv.org/abs/2312.15821
- [7]Weijie Kong, Qi Tian, Zijian Zhang, Rox Min, Zuozhuo Dai, Jin Zhou, Jianfeng Xiong, Xin Li, Bo Wu, Jianwei Zhang, et al., “Hunyuanvideo: A systematic framework for large video generative models,” arXiv preprint arXiv:2412.03603, 2024.arxiv.org/abs/2412.03603
- [8]Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud, “Neural ordinary differential equations,” Advances in neural information processing systems (NeurIPS), 2018.arxiv.org/abs/1806.07366
- [9]Brian DO Anderson, “Reverse-time diffusion equation models,” Stochastic Processes and their Applications, vol. 12, no. 3, pp. 313–326, 1982.DOI
- [10]Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole, “Score-based generative modeling through stochastic differential equations,” in International Conference on Learning Representations (ICLR), 2021.
- [11]Nanye Ma, Mark Goldstein, Michael S Albergo, Nicholas M Boffi, Eric Vanden-Eijnden, and Saining Xie, “SiT: Exploring flow and diffusion-based generative models with scalable interpolant transformers,” in European Conference on Computer Vision (ECCV). Springer, 2024, pp. 23–40.arxiv.org/abs/2401.08740
- [12]Ernst Hairer, Gerhard Wanner, and Syvert P Nørsett, Solving ordinary differential equations I: Nonstiff problems, Springer, 1993.
- [13]Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu, “Dpm-solver: A fast ode solver for diffusion probabilistic model sampling in around 10 steps,” Advances in neural information processing systems (NeurIPS), 2022.arxiv.org/abs/2206.00927
- [14]Neta Shaul, Juan Perez, Ricky TQ Chen, Ali Thabet, Albert Pumarola, and Yaron Lipman, “Bespoke solvers for generative flow models,” in International Conference on Learning Representations (ICLR), 2024.arxiv.org/abs/2310.19075
- [15]Shuai Wang, Zexian Li, Tianhui Song, Xubin Li, Tiezhen Ge, Bo Zheng, and Limin Wang, “Exploring dcn-like architecture for fast image generation with arbitrary resolution,” Advances in Neural Information Processing Systems (NeurIPS), 2024.DOI
- [16]Amirmojtaba Sabour, Sanja Fidler, and Karsten Kreis, “Align your steps: Optimizing sampling schedules in diffusion models,” arXiv preprint arXiv:2404.14507, 2024.arxiv.org/abs/2404.14507
- [17]Aditi Gupta, Soon Hoe Lim, Annan Yu, and N Benjamin Erichson, “Sharpen your flow: Sharpness-aware sampling for flow matching,” arXiv preprint arXiv:2605.11547, 2026.arxiv.org/abs/2605.11547
- [18]Qinchan Li, Pedro Cisneros-Velarde, Keru Fu, Samuel Antunes Miranda, Sharan Vaswani, and Hao Zhang, “Cat-flow: Curvature-adaptive steps for flow matching,” arXiv preprint arXiv:2609.01746, 2026.arxiv.org/abs/2609.01746
- [19]Vitalij Bondar, “Velocity scheduled flow matching,” arXiv preprint arXiv:2607.11442, 2026.arxiv.org/abs/2607.11442
- [20]Desmond J Higham, “An algorithmic introduction to numerical simulation of stochastic differential equations,” SIAM review, vol. 43, no. 3, pp. 525–546, 2001.DOI
- [21]Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei, “Imagenet: A large-scale hierarchical image database,” in 2009 IEEE conference on computer vision and pattern recognition, 2009, pp. 248–255.
- [22]Alex Krizhevsky, Geoffrey Hinton, et al., “Learning multiple layers of features from tiny images,” 2009.