TL;DR
SharpEuler is a training-free, offline calibration method that optimizes the timestep schedules of flow matching generative models. By profiling where a pretrained model's velocity field changes most rapidly (trajectory acceleration), it constructs a custom, non-uniform time grid that spends steps where they matter most. This simple adjustment significantly improves sample quality and mode coverage at low inference budgets without adding any online computational overhead or requiring model retraining.
What Problem Does This Paper Address?
Flow matching models generate high-quality data (like images or video) by numerically integrating a learned velocity field, transforming simple noise into a target distribution. However, each integration step requires a forward pass through a massive neural network. For fast generation, practitioners are forced to use a small, fixed budget of steps (e.g., 8 to 20 steps) using simple forward Euler integration.
Standard approaches typically use uniform or hand-shifted timestep schedules. The problem is that these schedules are completely blind to the underlying dynamics of the learned flow. In regions where the trajectory changes direction or speed rapidly, a coarse uniform step can overshoot, causing "inter-mode leakage" (mixing distinct data categories) or failing to resolve fine, curved structures in the data distribution.
Methods
The authors introduce SharpEuler, a method that shifts the cost of adaptive step-sizing from the online generation loop to a one-time, offline calibration phase.
- Offline Calibration: SharpEuler runs a small set of representative samples through a fine-grained reference trajectory (e.g., 50+ steps). It records consecutive velocity evaluations and uses finite differences to calculate the trajectory acceleration—a proxy for "sharpness." These acceleration profiles are averaged across the calibration set and smoothed using a Gaussian kernel to create a global sharpness profile.
- Quantile Transformation: This sharpness profile is converted into a cumulative distribution function (CDF). By taking uniform quantiles of this inverse CDF, SharpEuler maps out a deterministic, non-uniform time grid tailored to any desired inference budget $B$.
- Online Sampling: At test time, the model uses standard forward Euler integration on this newly calibrated grid. The model itself is unchanged, no extra network evaluations are added, and no online error estimation is required.
The method is mathematically anchored by three principles: a numerical principle showing acceleration controls Euler discretization error; a variational principle proving that optimal step allocation yields power-law densities; and a statistical principle guaranteeing calibration stability.
Datasets
The method was evaluated on two distinct types of benchmarks:
- Synthetic 2D Datasets: Branched Manifold (to test how well the sampler resolves thin, curved structures) and Rotated Grid (to test if it can preserve separated modes without creating off-manifold artifacts).
- High-Dimensional Text-to-Image: Pretrained FLUX.1-dev (a 12-billion parameter rectified flow transformer) evaluated on a held-out set of 80 diverse prompts spanning landscapes, wildlife, and urban scenes.
Key Insights and Ideas
- Adaptivity Doesn't Have to Be Expensive: Traditional adaptive ODE solvers calculate local truncation errors on the fly, which requires extra network evaluations during sampling. SharpEuler proves that you can pre-compute a reusable "sharpness map" offline because the regions of high acceleration are properties of the pretrained model and data geometry itself.
- The Exponent ($\gamma$) Tradeoff: The method introduces an exponent $\gamma$ to shape the sharpness profile. The authors show that $\gamma = 0.5$ (the square-root law) is mathematically optimal for minimizing global Euler discretization error. Meanwhile, higher exponents like $\gamma = 1.0$ act as a fidelity-coverage tradeoff, forcing the sampler to concentrate heavily on local mode accuracy at the expense of overall distribution coverage.
Key Results
On synthetic datasets, SharpEuler drastically outperforms uniform schedules and information-theoretic baselines like the Entropic Time Scheduler (ETS) at ultra-low budgets ($B=8$). It successfully maps complex geometries where other samplers produce unstructured noise or suffer from severe mode leakage.
For high-dimensional text-to-image generation with FLUX.1-dev, SharpEuler achieves massive quality improvements at low Number of Function Evaluations (NFE):
- At a budget of $B=12$ steps, SharpEuler ($\gamma=0.5$) cut the Frechet Inception Distance (FID) from 104.77 (Uniform) down to 48.65, and reduced pixel-level deviation (RMSE) from 39.97 to 16.51.
- In a perceptual study using GPT-5.5 as a vision judge at $B=16$, SharpEuler was preferred over the default pipeline schedule in all 50 pairwise comparisons, demonstrating vastly superior preservation of composition, lighting, and fine details.
Limitations and Future Work
- Grid Sensitivity: SharpEuler assumes that a pretrained model can gracefully handle arbitrary time grids. This assumption might break down for distilled models (like Consistency Models) that are explicitly trained or aligned to a specific, rigid sampling grid.
- Solver Specificity: The current formulation specifically targets the local truncation error of one-stage forward Euler. Extending this sharpness-aware calibration to higher-order or multistep ODE solvers remains an open avenue for future research.
Summary updated