Terminal Velocity Matching

Linqi Zhou, Mathias Parger, Ayaan Haque, Jiaming Song

TL;DR

Terminal Velocity Matching (TVM) is a novel single-stage framework for training high-fidelity generative models capable of producing images in just one or a few steps. By matching the terminal velocity of trajectories rather than the initial velocity, TVM provides a theoretical upper bound on distribution divergence and achieves state-of-the-art results on ImageNet from scratch.

The Challenge of Fast Generation

While Diffusion Models and Flow Matching have revolutionized image and video generation, they are notoriously slow, often requiring dozens of sampling steps to produce high-quality results. Researchers have attempted to "distill" these models into one-step samplers or train "consistency models" from scratch. However, these approaches face a difficult trade-off: they either lack a solid theoretical connection to distribution matching, require complex multi-stage training, or suffer from extreme instability when scaled to high-dimensional data.

The authors identify a specific gap in current trajectory-matching methods (like MeanFlow), which match derivatives at the initial time of a path. This makes it difficult to prove that the model is actually minimizing the distance between the generated and real data distributions. Furthermore, standard architectures like Diffusion Transformers (DiT) lack Lipschitz continuity, leading to exploding activations during the specialized training required for fast sampling.

Terminal Velocity Matching (TVM)

Comparison of TVM against MeanFlow and Flow Matching, alongside high-fidelity generated samples.

The core innovation is Terminal Velocity Matching (TVM). Instead of learning to predict the velocity at the start of a generation path, the model learns to match the velocity at the terminal time of the trajectory. This terminal matching is theoretically superior because it allows for a direct mathematical bound on the Wasserstein distance, providing a principled guarantee for high-quality samples.

Key technical components include:

  • The TVM Objective: A single-stage loss function that jointly optimizes for the instantaneous velocity field and the integrated displacement map. The authors prove this objective upper-bounds the 2-Wasserstein distance between the model and the data.
  • Semi-Lipschitz Control: To stabilize training, the authors modified the DiT architecture. They replaced standard LayerNorm with RMSNorm and introduced "QK-normalization" and modulation normalization.
Training stability comparison showing how Lipschitz control prevents exploding activations.

These minimal architectural changes ensure the network remains stable even when calculating higher-order gradients, completely taming the "exploding activations" often seen in consistency-style training.

  • Efficient JVP Kernel: Training TVM requires computing Jacobian-Vector Products (JVPs). Standard PyTorch implementations are memory-intensive and slow for this. The authors developed a custom Flash Attention kernel in Triton that supports backward passes on JVPs, resulting in a 65% speedup and significant memory savings.
  • Scaled CFG Parameterization: They introduced a way to incorporate Classifier-Free Guidance (CFG) directly into the training objective, allowing the model to handle different guidance strengths without retraining.

Key Results and Insights

Unlike many acceleration methods that require a pre-trained teacher model (distillation), TVM demonstrates that you can reach state-of-the-art performance training from scratch in a single stage.

Evaluated on standard high-resolution benchmarks, TVM sets a new state-of-the-art for few-step inference:

  • ImageNet-256×256: Achieved an FID of 3.29 in 1 step (NFE) and 1.99 in 4 steps. For context, this outperforms MeanFlow (3.43) and matches or exceeds much slower diffusion baselines.
  • ImageNet-512×512: Achieved a 1-NFE FID of 4.32, significantly outperforming sCT (4.33 with a larger model) and MeanFlow (5.24).
  • Efficiency: By fusing the JVP calculation into the attention kernel, the "computational tax" of higher-order gradients is mitigated. The custom kernel allows training on H100 clusters with large batch sizes (2048) that would otherwise trigger Out-Of-Memory (OOM) errors using standard attention mechanisms.

Limitations and Future Work

  • NFE Quality Trade-off: The authors noted a fundamental trade-off where models optimized for 1-step generation sometimes perform slightly worse when given more steps (2-4 NFEs) compared to models specifically tuned for those step counts.
  • Capacity Limits: While the model handles random CFG scales well, there is a limit to how much a single network can perfectly "fit" all possible guidance strengths.
  • Scaling to 10B+: While the paper mentions results at the 10B+ scale for text-to-image in a footnote, the primary experimental results are focused on the 678M parameter DiT-XL architecture. Future work will likely explore even larger transformer scales.

Summary updated

BibTeX
@inproceedings{zhou2026terminal,
  author = {Linqi Zhou and Mathias Parger and Ayaan Haque and Jiaming Song},
  title = {{Terminal Velocity Matching}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=plISxvVf6j},
}
Figure