Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

CFG++: Manifold-constrained Classifier Free Guidance for Diffusion Models

About

Classifier-free guidance (CFG) is a fundamental tool in modern diffusion models for text-guided generation. Although effective, CFG has notable drawbacks. For instance, DDIM with CFG lacks invertibility, complicating image editing; furthermore, high guidance scales, essential for high-quality outputs, frequently result in issues like mode collapse. Contrary to the widespread belief that these are inherent limitations of diffusion models, this paper reveals that the problems actually stem from the off-manifold phenomenon associated with CFG, rather than the diffusion models themselves. More specifically, inspired by the recent advancements of diffusion model-based inverse problem solvers (DIS), we reformulate text-guidance as an inverse problem with a text-conditioned score matching loss and develop CFG++, a novel approach that tackles the off-manifold challenges inherent in traditional CFG. CFG++ features a surprisingly simple fix to CFG, yet it offers significant improvements, including better sample quality for text-to-image generation, invertibility, smaller guidance scales, reduced mode collapse, etc. Furthermore, CFG++ enables seamless interpolation between unconditional and conditional sampling at lower guidance scales, consistently outperforming traditional CFG at all scales. Moreover, CFG++ can be easily integrated into high-order diffusion solvers and naturally extends to distilled diffusion models. Experimental results confirm that our method significantly enhances performance in text-to-image generation, DDIM inversion, editing, and solving inverse problems, suggesting a wide-ranging impact and potential applications in various fields that utilize text guidance. Project Page: https://cfgpp-diffusion.github.io/.

Hyungjin Chung, Jeongsol Kim, Geon Yeong Park, Hyelin Nam, Jong Chul Ye• 2024

Related benchmarks

TaskDatasetResultRank
Class-conditional Image GenerationImageNet 256x256
Inception Score (IS)257
1021
Text-to-Image GenerationGenEval
Overall Score55.6
914
Text-to-Video GenerationVBench
Quality Score83.58
209
Text-to-Image GenerationMS-COCO
FID11.87
193
Text-to-Image GenerationHPS v2.1
Overall Score30.21
153
Text-to-Image GenerationPick-a-Pic
PickScore21.83
150
Video GenerationVBench (test)
Semantic Score67.43
82
Text-to-Image GenerationDPGBench
Attribute Score79.7
53
Image GenerationImageNet-256 (FID-50K)
FID1.71
36
Text-to-Image GenerationDrawBench
HPS v228.65
33
Showing 10 of 16 rows

Other info

Follow for update