Abstract: In the realm of Artificial Intelligence Generated Content (AIGC), flow-matching models have emerged as a powerhouse, achieving success due to their robust theoretical underpinnings and solid ability for large-scale generative modeling. These models have demonstrated state-of-the-art performance, but their brilliance comes at a cost. The process of sampling from these models is notoriously demanding on computational resources, as it necessitates the use of multi-step numerical ordinary differential equations (ODEs). Against this backdrop, this paper presents a novel solution with theoretical guarantees in the form of Flow Generator Matching (FGM), an innovative approach designed to accelerate the sampling of flow-matching models into a one-step generation, while maintaining the original performance. On the CIFAR10 unconditional generation benchmark, our one-step FGM model achieves a new record Fr'echet Inception Distance (FID) score of 3.08 among few-step flow-matching-based models, outperforming original 50-step flow-matching models. Furthermore, we use the FGM to distill the Stable Diffusion 3, a leading text-to-image flow-matching model based on the MM-DiT architecture. The resulting MM-DiT-FGM one-step text-to-image model demonstrates outstanding industry-level performance. When evaluated on the GenEval benchmark, MM-DiT-FGM has delivered remarkable generating qualities, rivaling other multi-step models in light of the efficiency of a single generation step.
Introduction
In the world of generative AI, Flow-matching Models (FMs) have emerged as a powerful alternative to traditional Diffusion models due to their robust theoretical foundations and scalability. However, they share a common "Achilles' heel": sampling is slow. To generate an image, these models must solve an Ordinary Differential Equation (ODE) over many numerical steps (often 50 or more), which is computationally expensive and ill-suited for real-time applications.
While "distillation"—the process of teaching a smaller or faster "student" model to mimic a complex "teacher"—has worked well for Diffusion models, applying it to Flow-matching is mathematically complex. FMs do not explicitly model probability densities or score functions in the same way Diffusion models do, making standard probabilistic distillation techniques difficult to apply directly.
Methodology
The authors introduce Flow Generator Matching (FGM), a probabilistic framework designed for one-step distillation. The core challenge they solve is that the ideal objective—matching the student's marginal vector field to the teacher's—is intractable because the student's implicit flow is unknown during training. To bypass this, the authors contribute two key theoretical pieces:
- Flow Product Identity (Theorem 4.1): A mathematical identity that allows them to rewrite complex expectations involving the student's unknown flow.
- Tractable Objective: Using the identity above, they derive a loss function ($L_{FGM}$) that only requires differentiable samples from the student model and the teacher's pre-trained vector field.
The Training Loop
The process involves an "online" flow model that approximates the student's behavior. The algorithm alternates between updating this online model to track the student and updating the student generator ($g_\theta$) to minimize the distance between its implicit flow and the teacher’s ground truth flow. Additionally, the authors utilize Smart Initialization: instead of starting the student from scratch, they initialize it using the teacher's vector field at a specific optimal timestep ($t^*=0.97$), giving the student a massive "head start" in learning the mapping from noise to data.
Experimental Results
The researchers validated FGM across two main scales: the standard CIFAR-10 benchmark and large-scale text-to-image generation using Stable Diffusion 3 (SD3).
CIFAR-10 Performance
On the CIFAR-10 benchmark, the one-step FGM model demonstrated remarkable efficiency. For unconditional generation, it achieved a record FID score of 3.08, actually surpassing the original 50-step teacher model's score of 3.67. For class-conditional generation, FGM achieved an FID of 2.58, outperforming the 100-step teacher model (2.87).
Text-to-Image Distillation (MM-DiT-FGM)
By distilling Stable Diffusion 3, the authors created a one-step model that rivals multi-step giants. On the GenEval benchmark, their one-step model scored 0.65 Overall, very close to the 28-step SD3 teacher's score of 0.70, while being significantly more efficient. The resulting MM-DiT-FGM model produces high-fidelity images across diverse categories including portraits, animals, and landscapes in a single step.
Discussion and Insights
- The Student Surpasses the Teacher: The fact that the one-step FGM model can outperform its multi-step teacher suggests that the distillation process might be "straightening" the flow or acting as a form of beneficial regularization.
- Data-Free Potential: The pure FGM algorithm is technically "image-data-free" as it learns to match the teacher's internal logic. However, for complex text-to-image tasks, the authors found that adding a GAN loss helped recover fine-grained details.
Conclusion and Future Work
Despite the strong results, the authors note a few hurdles. The training process requires keeping an additional "online" flow model in memory, which can be challenging when distilling models with billions of parameters. Furthermore, while FGM is theoretically data-free, the highest quality results currently require supplemental GAN losses and real image data to capture high-frequency details. Future directions include exploring ways to integrate real data more deeply into the FGM framework to further close the quality gap between one-step and multi-step generation.
Summary updated