Introduction
Diffusion and flow-based models have established themselves as the state-of-the-art for high-fidelity image and video generation. However, their primary drawback remains the high computational cost at inference time, often requiring dozens or hundreds of sampling steps to produce a single high-quality image. While distillation techniques like Consistency Models (CMs) have attempted to bridge this gap by creating one-step generators, they often suffer from a significant performance trade-off: their quality tends to degrade if the user attempts to use more sampling steps to refine the output.
Align Your Flow (AYF) introduces a novel framework for distilling these slow models into efficient generators that are not only fast (1–4 steps) but also robust. Unlike previous methods, AYF performance scales gracefully with additional computation, achieving state-of-the-art results on ImageNet and high-resolution text-to-image tasks.
The Limitation of Consistency Models
The core challenge in distillation is maintaining the quality of the "teacher" model while reducing the number of steps. Consistency Models (CMs) are trained to map any point on a probability flow ODE trajectory directly back to the origin (the clean data). While effective for 1-step generation, the authors mathematically demonstrate (Theorem 3.1) that CMs are inherently flawed for multi-step sampling.
Because CMs are optimized to jump straight to the data manifold, small errors in each step accumulate. When a sample is re-noised to perform a subsequent step, these errors push the sample further away from the true data manifold, leading to a "drift" that causes image quality to decrease as more steps are taken. AYF addresses this by shifting the paradigm from consistency functions to flow maps.
Methodology: The Flow Map Framework
AYF utilizes a Flow Map framework, which learns to map between any two arbitrary noise levels in a single step. This generalizes the distillation process, making the model a "super-set" of existing methods: if the target time is set to zero, it behaves like a Consistency Model; if the time step is infinitesimal, it mirrors Flow Matching.
Continuous-Time Training Objectives
The authors introduce two new continuous-time losses to stabilize and improve training:
- AYF-EMD (Eulerian): A loss function that focuses on the velocity of the flow.
- AYF-LMD (Lagrangian): A loss function that focuses on the trajectory of the particles. These objectives allow for a more stable distillation process compared to the discrete-time objectives used in earlier consistency distillation works.
Autoguidance and Adversarial Refinement
To further enhance performance, AYF introduces two key training strategies:
- Autoguidance for Distillation: For the first time, autoguidance is applied during the distillation phase. By using a smaller, lower-quality version of the teacher model to guide the student, the model can sharpen images and improve detail without the typical artifacts associated with heavy Classifier-Free Guidance (CFG).
- Adversarial Finetuning: To achieve maximum sharpness, the authors employ a brief stage of adversarial training. This stage is carefully calibrated to boost visual fidelity while preserving the high sample diversity (Recall) of the original teacher model, avoiding the "mode collapse" common in GAN-based distillation.
Scaling to Text-to-Image
For large-scale applications, the authors applied AYF to the FLUX.1 [dev] model using Low-Rank Adaptation (LoRA). This allowed for the efficient distillation of a massive model using a filtered subset of 100,000 high-quality images from the Text-to-Image-2M dataset.
Experimental Results
ImageNet Benchmarks
AYF achieves state-of-the-art FID scores for few-step generation on both ImageNet 64x64 and 512x512. Notably, on ImageNet 512, a 4-step AYF sampler is over twice as fast as the previous state-of-the-art 1-step consistency model (sCM) while delivering significantly higher image quality.
Robustness and Scaling
A defining characteristic of AYF is its robustness to sampling steps. In "FID vs. Steps" evaluations, AYF is the only distilled model whose performance remains stable or improves as the number of sampling steps increases from 1 to 64. This allows users to trade off computation for quality—a feature missing in standard CMs.
Human Preference in Text-to-Image
In human preference studies for text-to-image generation, AYF distilled from FLUX.1 was consistently preferred over other popular fast samplers, such as Latent Consistency Models (LCM) and Trajectory Consistency Distillation (TCD). Reviewers noted better aesthetic appeal, finer details, and superior adherence to complex prompts.
Conclusion
Align Your Flow represents a significant step forward in the efficiency of generative modeling. By identifying and fixing the mathematical flaws in consistency-based distillation, AYF provides a framework that is both fast and computationally scalable. While the method currently relies on a high-quality teacher model, its success on ImageNet and FLUX.1 suggests it is a robust candidate for future applications in video generation and other complex domains where sampling speed is a critical bottleneck.
Summary updated