FastFlow: Accelerating The Generative Flow Matching Models with Bandit Inference

Divya Jyoti Bajpai, Dhruv Bhardwaj, Soumya Roy, Tejas Duseja, Harsh Agarwal, Aashay Sandansing, Manjesh Kumar Hanawal

TL;DR

FastFlow is a training-free, "plug-and-play" framework that accelerates Flow Matching (FM) models by over 2.6× without sacrificing generation quality. By using a Multi-Armed Bandit (MAB) to dynamically decide which denoising steps can be approximated via cheap velocity estimates, it avoids expensive neural network evaluations on the fly, adapting its speed to the complexity of each specific input.

The Challenge of Inference Latency in Flow Matching

Flow Matching (FM) models have become a powerhouse for high-fidelity image and video generation because they learn to transport simple noise to complex data distributions along smooth, nearly linear trajectories. However, their primary weakness is inference latency. To generate a high-quality image or video, these models must perform dozens of sequential "denoising" steps, each requiring a heavy forward pass through a massive neural network.

Existing acceleration methods like distillation or consistency training require expensive retraining and often fail to generalize across different tasks (e.g., a model distilled for image generation might not work for video editing). Furthermore, most current methods use a "one-size-fits-all" inference schedule, ignoring the fact that a simple prompt (like "a cat") might require far less computation than a complex one (like "a cat and a lion eating noodles").

Introducing FastFlow: Adaptive Bandit Inference

The authors introduce FastFlow, which treats the generative process as an adaptive decision-making problem.

FastFlow Architecture

Its core components are:

  1. Velocity Approximation: Instead of running the full model at every step, FastFlow uses a first-order Taylor series expansion and finite-difference estimates. It looks at the "velocity" (the direction of denoising) from previous steps to extrapolate the next state at virtually zero computational cost.
  2. Bandit Inference: To decide when it is safe to skip a full model evaluation, the authors employ a Multi-Armed Bandit (MAB). At each timestep, a bandit agent selects an "arm" representing a skip length (e.g., skip 0, 2, 4, or 6 steps).
  3. Adaptive Reward Function: The bandit is guided by a reward that balances two competing goals: Efficiency (higher rewards for skipping more steps) and Accuracy (penalties for the "drift" or error introduced by the approximation compared to a true model evaluation).
  4. Zero Retraining: FastFlow is a wrapper. It requires no additional training, no auxiliary networks, and can be plugged into any existing FM-based pipeline (like Flux or Stable Diffusion).

Key Insights and Trajectory Dynamics

  • The Three-Phase Trajectory: The authors observed a distinct pattern in FM models: they first establish a coarse flow, then enter a "stable" middle phase where updates are subtle and predictable, and finally perform fine-grained adjustments. FastFlow exploits the stable middle phase to skip the most computation.
  • Input-Dependent Speed: Unlike static methods, FastFlow is truly dynamic. It learns on-the-fly that simpler prompts can be accelerated more aggressively, while complex prompts trigger more frequent model evaluations to preserve detail.
  • Theoretical Stability: The paper provides a formal proof establishing a bound on the deviation of the final generated state. This ensures that the "shortcuts" taken by the bandit don't lead the model off a metaphorical cliff.

Performance and Results

The researchers evaluated FastFlow across three distinct domains: Image Generation (GenEval benchmark), Image Editing (GEdit benchmark), and Video Generation (VBench dataset).

Performance Comparison on BAGEL and FLUX
  • Speedup: FastFlow consistently achieves speedups between 2.37× and 2.65× across various models (Flux, BAGEL) and solvers.
  • Fidelity: In many cases, the quality of FastFlow-generated images was nearly indistinguishable from the "Full Model" baseline. On the GenEval benchmark, it maintained high scores in object counting and color attribute binding while being significantly faster. Compared to recent baselines like TeaCache, which often converge to a fixed, repetitive skipping pattern, FastFlow’s bandit approach remains flexible and yields superior semantic consistency and perceptual quality at equivalent speedups.
  • Video Performance: On the HunYuanVideo model, FastFlow delivered sharper frames and more coherent motion than standard step-reduction techniques.

Limitations and Future Work

  • Exploration Cold-Start: Because the Multi-Armed Bandit needs to "explore" different skip lengths to learn what works, the speedup may not be as pronounced in the very first few steps of a generation or during the very first prompt of a session.
  • Initial Step Complexity: The authors note that the initial steps of the denoising process are often the most chaotic, making them difficult to accelerate even with adaptive methods.
  • Future Directions: The authors suggest that future work could involve more sophisticated bandit architectures or exploring how FastFlow interacts with higher-order numerical solvers beyond the standard Euler method.

Summary updated

BibTeX
@inproceedings{bajpai2026fastflow,
  author = {Divya Jyoti Bajpai and Dhruv Bhardwaj and Soumya Roy and Tejas Duseja and Harsh Agarwal and Aashay Sandansing and Manjesh Kumar Hanawal},
  title = {{FastFlow: Accelerating The Generative Flow Matching Models with Bandit Inference}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=wWkyL8D9xd},
}
Figure