Extensions/ComfyUI-SMC-CFG
ComfyUI Extension

ComfyUI-SMC-CFG

ComfyUI wrapper for SMC-CFG (Sliding Mode Control) classifier-free diffusion guidance from CVPR 2026 research.

By belgiangurista-art·Created 5 months ago·Updated 5 months ago· 1
belgiangurista-art/ComfyUI-SMC-CFG
Nodes1
On cloudLocal install
Categorymodel_patches/SMC_CFG
Stars1
Updated5 months ago
Readme

ComfyUI-SMC-CFG (Official Bridge)

This repository provides a ComfyUI for desktop wrapper for SMC-CFG (Sliding Mode Control), as introduced in the CVPR 2026 paper:
"CFG-Ctrl: Control-Based Classifier-Free Diffusion Guidance", https://github.com/hanyang-21/CFG-Ctrl.

📖 Introduction

CFG-Ctrl reinterprets Classifier-Free Guidance as a control problem. While vanilla CFG acts as a proportional controller (P-control), it can lead to instability at high scales. SMC-CFG introduces a nonlinear sliding mode controller that enforces the guidance error to converge along an exponential sliding surface, preventing "overbaking" and improving semantic alignment.

🛠 Installation

  1. Navigate to ComfyUI/custom_nodes.
  2. Clone this bridge: git clone https://github.com/belgiangurista-art/ComfyUI-SMC-CFG.
  3. Install the base requirements: pip install diffsynth.
  4. Ensure you have the original research code available if running custom scripts.

📊 Official Parameters & Recommended Settings

Based on the original repository:

Note: For distilled/lightning models (like 4-step variants), doesn't work, results are overbaked.

🎓 Citation & Credits

All credit goes to the original authors: Hanyang Wang, Yiyang Liu, Jiawei Chi, Fangfu Liu, Ran Xue, Yueqi Duan (Tsinghua University).

Original Source: hanyang-21/CFG-Ctrl.