SnapCache: Accelerating Flow Matching via Trajectory Pruning and Compensation
Abstract
Flow matching generates samples by numerically integrating a learned velocity field, requiring repeated velocity-field evaluations along the sampling trajectory. Step skipping reduces this cost by reusing cached velocities, but the resulting errors accumulate through the solver. Model compression addresses a related problem by compensating for removed parameters through retained ones. We apply this principle to sampling with \method, a solver-aware step-skipping method that retains the original integration grid. At the next retained sampling step, a velocity residual reveals information about the error accumulated during the skipped interval without an additional model evaluation. Optimal Brain Trajectory Compensation(OBTC) estimates this error and applies a minimum-change correction to the refreshed velocity or multistep history. A causal scheduler selects the next skipped interval by comparing its predicted residual error with the solver's truncation-error scale. The method supports Euler integration and UniPC with one dimensionless tolerance. We study the same compensation mechanism in image and video sampling and illustrate its use in action sampling. On FLUX.1-dev, Krea-2-Raw, and Wan2.2, \method improves sample-fidelity trade-offs over the compared caching baselines at approximately – fewer network forward passes. A qualitative LIBERO rollout complements these quantitative results by illustrating successful task completion under accelerated action sampling.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.