Rectified Diffusion Guidance for Conditional Generation
Mengfei Xia, Nan Xue, Yujun Shen, Ran Yi, Tieliang Gong, Yong-Jin Liu
Abstract
Classifier-Free Guidance (CFG), which combines the conditional and unconditional score functions with two coefficients summing to one, serves as a practical technique for diffusion model sampling. Theoretically, however, denoising with CFG cannot be expressed as a reciprocal diffusion process, which may consequently leave some hidden risks during use. In this work, we revisit the theory behind CFG and rigorously confirm that the improper configuration of the combination coefficients (i.e., the widely used summing-to-one version) brings about expectation shift of the generative distribution. To rectify this issue, we propose ReCFG 1 with a relaxation on the guidance coefficients such that denoising with ReCFG strictly aligns with the diffusion theory. We further show that our approach enjoys a closed-form solution given the guidance strength. That way, the rectified coefficients can be readily pre-computed via traversing the observed data, leaving the sampling speed barely affected. Empirical evidence on real-world data demonstrate the compatibility of our post-hoc design with existing state-of-the-art diffusion models, including both class-conditioned ones (e.g., EDM2 on ImageNet) and text-conditioned ones (e.g., SD3 on CC12M), without any retraining. Code is available at https://github.com/thuxmf/recfg .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ae12553f-4f3f-4e83-a51d-9fdc2d91b33dCited by top-tier papers14
- Rectified CFG++ for Flow Based ModelsShreshth Saini, Shashank Gupta, Alan BovikNeurIPS 2025 · 20 citations
- Normalized Attention Guidance: Universal Negative Guidance for Diffusion ModelsDar-Yen Chen, Hmrishav Bandyopadhyay, Kai Zou, Yi-Zhe SongNeurIPS 2025 · 17 citations
- Feedback Guidance of Diffusion ModelsFelix Koulischer, Florian Handke, Johannes Deleu, Thomas Demeester et al.NeurIPS 2025 · 16 citations
- Stage-wise Dynamics of Classifier-Free Guidance in Diffusion ModelsCheng Jin, Qitan Shi, Yuantao GuICLR 2026 · 13 citations
- Learn to Guide Your Diffusion ModelAlexandre Galashov, Ashwini Pokle, Arnaud Doucet, Arthur Gretton et al.ICLR 2026 · 12 citations
Builds on20
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
- Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
Related papers
- Inner Classifier-Free Guidance and Its Taylor Expansion for Diffusion ModelsShikun Sun, Longhui Wei, Zhicai Wang, Zixuan Wang et al.ICLR 2024 · 2 citations
- CFG++: Manifold-constrained Classifier Free Guidance for Diffusion ModelsHyungjin Chung, Jeongsol Kim, Geon Yeong Park, Hyelin Nam et al.ICLR 2025
- No Training, No Problem: Rethinking Classifier-Free Guidance for Diffusion ModelsSeyedmorteza Sadat, Manuel Kansy, Otmar Hilliges, Romann M. WeberICLR 2025
- Improving Classifier-Free Guidance in Masked Diffusion: Low-Dim Theoretical Insights with High-Dim ImpactKevin Rojas, Ye He, Chieh-Hsin Lai, Yuhta Takida et al.ICLR 2026 · 11 citations
- Rethinking the Spatial Inconsistency in Classifier-Free Diffusion GuidanceDazhong Shen, Guanglu Song, Zeyue Xue, Fu-Yun Wang et al.CVPR 2024 · 12 citations
