CFG-Ctrl: Control-Based Classifier-Free Diffusion Guidance

Hanyang Wang, Yiyang Liu, Jiawei Chi, Fangfu Liu, Ran Xue +1 more
3/3/2026
cs.CVcs.LG

No official code found. Best implementation: THU-SI/CFG-Ctrl (46 stars, Apache-2.0, last commit 2026-03-04).

Abstract

Classifier-Free Guidance (CFG) has emerged as a central approach for enhancing semantic alignment in flow-based diffusion models. In this paper, we explore a unified framework called CFG-Ctrl, which reinterprets CFG as a control applied to the first-order continuous-time generative flow, using the conditional-unconditional discrepancy as an error signal to adjust the velocity field. From this perspective, we summarize vanilla CFG as a proportional controller (P-control) with fixed gain, and typical follow-up variants develop extended control-law designs derived from it. However, existing methods mainly rely on linear control, inherently leading to instability, overshooting, and degraded semantic fidelity especially on large guidance scales. To address this, we introduce Sliding Mode Control CFG (SMC-CFG), which enforces the generative flow toward a rapidly convergent sliding manifold. Specifically, we define an exponential sliding mode surface over the semantic prediction error and introduce a switching control term to establish nonlinear feedback-guided correction. Moreover, we provide a Lyapunov stability analysis to theoretically support finite-time convergence. Experiments across text-to-image generation models including Stable Diffusion 3.5, Flux, and Qwen-Image demonstrate that SMC-CFG outperforms standard CFG in semantic alignment and enhances robustness across a wide range of guidance scales. Project Page: https://hanyang-21.github.io/CFG-Ctrl

View on arXivView PDF

Code Implementations(1)

THU-SI/CFG-CtrlCommunity77%
Apache-2.0

[CVPR 2026] CFG-Ctrl: Control-Based Classifier-Free Diffusion Guidance

462PythonMar 3, 20267 months agoApache-2.0

Cite this paper

@article{wang2026cfgctrl,
  title  = {CFG-Ctrl: Control-Based Classifier-Free Diffusion Guidance},
  author = {Hanyang Wang and Yiyang Liu and Jiawei Chi and Fangfu Liu and Ran Xue and Yueqi Duan},
  year   = {2026},
  eprint = {2603.03281},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.03281v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.03281.svg)](https://codeofpaper.com/paper/2603.03281)

Discussion