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

Hyungjin Chung, Jeongsol Kim, G. Park, Hyelin Nam, Jong Chul Ye

arXiv:2406.08070 · 2026-07-27 공개 · arXiv · PDF

diffusion-models text-to-image image-editing classifier-free-guidance mode-collapse score-matching inverse-problem ddim-inversion

Abstract

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/.

한국어 요약

한 줄 요약

CFG++는 확산 모델에서 텍스트 조건을 더 정확하게 반영하는 기하학적 접근을 통해 기존 CFG의 문제를 해결한 새로운 샘플링 방법이다.

핵심 기여도

핵심 아이디어

기존의 classifier-free guidance (CFG)는 텍스트 조건을 반영하기 위해 unconditional score와 conditional score 간의 차이를 확대하는 방식을 사용한다. 그러나 이는 샘플링 과정에서 off-manifold 현상을 유발해 모델의 샘플 품질, 편집 가능성, 모드 다양성에 악영향을 미친다. 본 연구는 최근의 diffusion inverse solver (DIS)에서의 성과를 바탕으로, 텍스트 조건을 inverse problem으로 재구성하고, text-conditioned score matching loss를 도입하여 off-manifold 문제를 해결한다. 이를 통해 샘플링 과정에서 unconditional와 conditional 샘플링 간의 보간(interpolation)을 가능하게 하여, 기존의 단순 외삽(extrapolation) 방식과 달리 더 안정적이고 해석 가능한 가이드가 가능해진다.

기술적 접근법

주요 결과

의의 및 한계

CFG++는 기존의 확산 모델에서 텍스트 조건을 반영하는 방식의 근본적인 문제(off-manifold)를 해결함으로써 샘플 품질, 편집 가능성, 모델 안정성 등을 동시에 향상시킨다. 특히, 고가이드 스케일을 사용하지 않아도 뛰어난 성능을 보이는 점은 기존의 확산 모델 샘플링 방식에 중요한 통찰을 제공한다. 그러나 본 연구는 실험적으로 T2I 생성, inversion, 편집 등에만 적용되었으며, 다른 유형의 조건부 생성 작업에 대한 평가가 부족하다는 한계가 있다. 또한, 실제 산업 환경에서의 대규모 데이터셋 적용 가능성에 대한 평가도 추가 연구가 필요하다.

실용적 활용

CFG++는 텍스트 기반 이미지 생성, 이미지 편집, inverse problem 해결 등 다양한 분야에서 활용 가능하다. 특히, 텍스트 조건을 정확하게 반영하면서도 샘플 다양성을 유지할 수 있어, 디자인, 콘텐츠 생성, 의료 영상 등에서 실용적 가치가 높다. 또한, 기존의 확산 모델 기반 솔루션에 쉽게 통합 가능하다는 점에서 높은 확장성을 가진다.