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
翻译:分类器无关引导(CFG)已成为增强基于流的扩散模型中语义对齐的核心方法。本文探讨了一个名为CFG-Ctrl的统一框架,该框架将CFG重新解释为应用于一阶连续时间生成流的控制,利用条件-无条件差异作为误差信号来调整速度场。基于此视角,我们将原始CFG总结为具有固定增益的比例控制器(P-control),而典型的后续变体则在此基础上衍生出扩展的控制律设计。然而,现有方法主要依赖线性控制,这本质上会导致不稳定性、超调以及语义保真度下降,尤其是在大引导尺度下。为解决这一问题,我们引入了滑模控制CFG(SMC-CFG),它强制生成流向快速收敛的滑模流形推进。具体而言,我们在语义预测误差上定义了一个指数型滑模面,并引入一个切换控制项以建立非线性反馈引导的校正。此外,我们提供了李雅普诺夫稳定性分析,从理论上支持有限时间收敛。在包括Stable Diffusion 3.5、Flux和Qwen-Image在内的文本到图像生成模型上的实验表明,SMC-CFG在语义对齐方面优于标准CFG,并在广泛的引导尺度范围内增强了鲁棒性。项目页面:https://hanyang-21.github.io/CFG-Ctrl