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.
SMC-CFG (CFG-Ctrl)
- model
- model
◄smc_lambda0.05►
◄smc_k0.10►
◄warmup_steps2►
◄adaptive_scaletrue►
◄max_correction_ratio0.25►
CategoryCFG-Ctrl
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| smc_lambda | FLOAT | 0.050–50 | Exponential decay coefficient λ of the sliding surface. Recommended by paper: 5.0 for FLUX / SD3 / Wan. |
| smc_k | FLOAT | 0.100–1 | Switching 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_steps | INT | 20–50 | Steps at the start where NO CFG is applied (only cond prediction). SMC state initialises at the first active step. |
| adaptive_scale | BOOLEAN | true | Normalise 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_ratio | FLOAT | 0.250–1 | Hard 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)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |