AnyFlow: Any-Step Video Diffusion Model with On-Policy Flow Map Distillation

Yuchao Gu, Guian Fang, Yuxin Jiang, Weijia Mao, Song Han, Han Cai, Mike Zheng ShouarXiv 2026

TL;DR

AnyFlow is the first any-step video diffusion distillation framework based on flow maps, allowing a single model to dynamically trade latency for quality at test time. By shifting the distillation target from endpoint consistency mapping to arbitrary time-pair transitions, it eliminates the performance degradation typically seen in consistency models when step budgets are increased.

What Problem Does This Paper Address?

Current few-step video generation relies heavily on consistency distillation (CD). While CD models excel under very small sampling budgets (e.g., 2-4 steps), their performance often paradoxically degrades when you allocate more sampling steps at test time.

This lack of test-time scaling stems from a structural limitation: consistency models are trained to map any intermediate state directly to the final clean output ($z_t \rightarrow z_0$). To perform multi-step sampling, these models must repeatedly re-noise intermediate states. This re-noising introduces cumulative bias, causing the sampling trajectory to drift away from the true probability-flow ODE (PF-ODE) path.

In practice, users need "any-step" flexibility: rapid, low-latency previews for quick iteration, and high-fidelity outputs for final delivery. The authors introduce AnyFlow to bridge this gap, ensuring that video quality monotonically improves with additional computational budget.

Quantitative and qualitative comparison of AnyFlow test-time scaling against consistency-based methods and the teacher model.

Methods

Instead of distilling a model for a few fixed endpoints, AnyFlow optimizes the full ODE sampling trajectory using a two-time flow map formulation. The framework operates in two complementary stages:

  1. Forward Flow Map Training: The authors convert a pretrained video diffusion model into a flow map model that learns transitions between arbitrary time pairs ($z_t \rightarrow z_r$) rather than just the endpoint ($z_t \rightarrow z_0$). To stabilize this post-training phase, they introduce several key modifications to the standard MeanFlow objective: interpolated timestep conditioning to keep embedding norms stable, guidance-fused training to bake classifier-free guidance into the model, and an adaptive loss reweighting scheme.
  2. On-Policy Flow Map Distillation: To mitigate test-time discretization errors and exposure bias, the model is fine-tuned on its own generated rollouts using Distribution Matching Distillation (DMD). To make this computationally viable, the authors propose Flow Map Backward Simulation. Leveraging the composition property of flow maps, this technique decomposes a full trajectory rollout into efficient "shortcut" segments ($T \rightarrow t \rightarrow r \rightarrow 0$), allowing the system to backpropagate gradients through the chain without simulating every single intermediate step.
Comparison of Distillation Paradigms between Consistency Distillation and Flow Map Distillation.

Datasets

AnyFlow was trained on a synthetic dataset consisting of 256K prompt-video pairs generated by the Wan2.1-T2V-14B model, with clips containing up to 81 frames at a resolution of 480 × 832.

For evaluation, the authors utilized VBench (for text-to-video quality and semantic consistency) and VBench-I2V (for image-to-video evaluation). Additionally, the model's downstream adaptability was validated using specialized datasets across Robotics, Driving, and Gaming domains.

Key Insights and Ideas

  • Flow Maps as a Trajectory Cure: Shifting the distillation target from fixed endpoints ($z_0$) to local transitions ($z_r$) preserves the fine-grained flow field of the original model. This allows standard Euler schedulers to be used at test time, restoring the natural scaling behavior of ODEs.
  • Trajectory Shortcutting: The core mathematical insight behind Flow Map Backward Simulation is that $f_\theta(z_t, t, q) \approx f_\theta(f_\theta(z_t, t, r), r, q)$. By using the model's own transition predictions to take large jumps in time during training, on-policy distillation scales efficiently to higher step counts, actually reducing training costs by up to 47% compared to consistency methods at 16 steps.
  • Downstream Fine-Tuning Compatibility: Because AnyFlow preserves the instantaneous flow field rather than destroying it via fixed-point mapping, the distilled model remains fully compatible with continued fine-tuning on downstream datasets. This bypasses the massive complexity of retraining a causal generator from scratch for specialized domains like robotics or autonomous driving.

Key Results

AnyFlow was validated across both bidirectional and causal architectures ranging from 1.3B to 14B parameters:

  • Causal Text-to-Video: At the 14B scale, AnyFlow-FAR achieved a VBench score of 84.05 at 4 Number of Function Evaluations (NFEs) and scaled up to 84.41 at 32 NFEs, outperforming Krea-Realtime-14B (83.25 at 4 NFEs).
  • Bidirectional Text-to-Video: The 14B AnyFlow model reached a score of 84.04 at 4 NFEs, outperforming its consistency-based counterpart rCM-14B (83.73 at 4 NFEs).
  • Image-to-Video: AnyFlow-FAR achieved a VBench-I2V score of 87.87 at just 4 NFEs, matching the performance of the base Wan2.1-I2V-14B model which requires a much heavier budget of 50×2 NFEs.

Limitations and Future Work

The primary limitation identified by the authors is AnyFlow's reliance on external or synthetic datasets for the flow map training stage. This can introduce a mild distribution shift, occasionally resulting in overly smooth textures compared to the base model.

For future work, the authors suggest exploring more robust and stable forward flow map training strategies to handle diverse NFE regimes. They also aim to extend this framework to autoregressive long-video generation by integrating dedicated long-video training techniques.

Summary updated

BibTeX
@misc{gu2026anyflow,
  author = {Yuchao Gu and Guian Fang and Yuxin Jiang and Weijia Mao and Song Han and Han Cai and Mike Zheng Shou},
  title = {{AnyFlow: Any-Step Video Diffusion Model with On-Policy Flow Map Distillation}},
  year = {2026},
  eprint = {2605.13724},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.13724},
}

Loading related content...

Figure