Abstract
Classifier-free Guidance (CFG) has become a standard technique for improving the quality and prompt alignment of diffusion models. However, it imposes significant costs, including doubled inference latency and training inefficiencies. This paper introduces Model-guidance (MG), a novel training objective that integrates the guidance logic directly into the model's learning process. By transforming the diffusion model into an implicit classifier, MG eliminates the need for dual forward passes at inference. Experimental results on ImageNet 256×256 demonstrate that MG achieves a state-of-the-art FID of 1.34, provides a 2x inference speedup, and accelerates training convergence by 6.5x compared to standard diffusion training.
Introduction
In modern generative modeling, CFG is the primary mechanism for enhancing sample quality. Despite its success, CFG requires running the model twice for every denoising step—once with the condition and once without—effectively doubling the computational tax. Furthermore, training a model to handle both conditional and unconditional generation simultaneously can reduce overall network capacity and lead to artifacts like over-saturation or mode collapse at high guidance scales. This work addresses these challenges by proposing a method to achieve the benefits of guidance without the inference-time overhead.
Methods
The core innovation of Model-guidance (MG) is to treat guidance as an optimization target during training rather than a post-hoc inference trick. Using Bayes' rule, the authors derive a way to estimate the posterior probability of conditions using the model's own outputs.
Instead of training the model to predict standard ground-truth noise ($\epsilon$), MG trains the model to predict a "calibrated" target: $$\epsilon' = \epsilon + w \cdot \text{sg}(\epsilon_\theta(x_t, t, c) - \epsilon_\theta(x_t, t, \emptyset))$$ where $w$ is the guidance scale and "sg" denotes a stop-gradient operation to ensure stability. This approach allows the model to learn the "guided" distribution directly.
As shown in Figure 1, the implementation is remarkably simple, often requiring just a single line of code change in the loss function. Additionally, "Scale-aware networks" can be employed where the guidance scale $w$ is an input, allowing for adjustable guidance strength at inference time without requiring a second forward pass.
Key Insights and Qualitative Analysis
A significant advantage of MG over CFG is its impact on the probability distribution of the generated samples. While CFG often "blindly pushes" samples toward high-probability regions, which can lead to mode collapse and reduced diversity, MG produces more symmetric and stable probability contours.
As illustrated in Figure 2, MG trajectories are more direct, and the resulting model PDF maintains better coverage of the data distribution (higher recall) while maintaining high quality. This implicit classification mechanism allows the model to learn which features are most relevant to the prompt more effectively than standard training.
Key Results
The researchers evaluated MG on ImageNet 256×256 and 512×512 benchmarks. Key findings include:
- State-of-the-Art Performance: MG achieved an FID of 1.34 on ImageNet 256, outperforming established models like DiT and SiT that rely on standard CFG.
- Inference Efficiency: By requiring only one forward pass per step, MG is 2x faster during inference than CFG-based counterparts.
- Training Acceleration: The method converges significantly faster, reaching high-quality results 6.5x sooner than vanilla diffusion training.
- Scalability: The gains are consistent across different architectures (DiT, SiT) and model sizes, from base to extra-large configurations.
Conclusion and Future Work
Model-guidance offers a compelling alternative to Classifier-free Guidance by baking the guidance logic into the training phase. While it requires retraining or fine-tuning from scratch, the benefits in inference speed, training efficiency, and sample diversity are substantial. Future research will focus on scaling this method to massive text-to-image datasets where prompt complexity is significantly higher, potentially revolutionizing how large-scale foundation models are trained and deployed.
Summary updated