Nodes/ComfyUI-CFG-Ctrl/SMC-CFG (CFG-Ctrl)
ComfyUI Node

SMC-CFG (CFG-Ctrl)

Applies SMC-CFG (Sliding Mode Control Classifier-Free Guidance) from CFG-Ctrl (CVPR 2026). Adaptive by default — works across FLUX, SD3/SD3.5, SDXL, Pony, SD1.5, Wan Video without per-model tuning.

By flyghtxmz·Created 5 months ago·Updated 5 months ago· 1
SMC-CFG (CFG-Ctrl)
  • model
  • model
smc_lambda0.05
smc_k0.10
warmup_steps2
adaptive_scaletrue
max_correction_ratio0.25
CategoryCFG-Ctrl

Inputs (6)

NameTypeDefaultDescription
modelMODEL
smc_lambdaFLOAT0.050–50Exponential decay coefficient λ of the sliding surface. Recommended by paper: 5.0 for FLUX / SD3 / Wan.
smc_kFLOAT0.100–1Switching gain K. With adaptive_scale ON this is a ratio of ||e_t||: K=0.1 means correction ≤ 10% of the error signal. Safe range: 0.05–0.3 for any model.
warmup_stepsINT20–50Steps at the start where NO CFG is applied (only cond prediction). SMC state initialises at the first active step.
adaptive_scaleBOOLEANtrueNormalise s_t by ||e_t|| before applying gain K. Makes K a dimensionless ratio — same value works across FLUX, SD3, SDXL, SD1.5, Pony and any other model. Disable to use the raw paper formulation (requires per-model K tuning).
max_correction_ratioFLOAT0.250–1Hard safety clamp: ||u_sw|| is limited to this fraction of ||e_t||. 0.25 = correction never exceeds 25% of the error signal. Set 0.0 to disable. Prevents runaway correction on any model.

Outputs (1)

NameTypeDescription
modelMODEL