ComfyUI Node
DCW + CWM + SMC Model Patch
DCW – Differential Correction in Wavelet domain (SNR-t bias correction). CWM – CFG Wavelet Mixing (adaptive per-band guidance scale). SMC – Sliding Mode Control CFG (integrated into CWM, corrects guidance error). All three are training-free and plug-and-play.
DCW + CWM + SMC Model Patch
- model
- model
◄lambda_l0.050►
◄lambda_h0.010►
◄dcw_enabledtrue►
◄alpha_l0.00►
◄alpha_h0.00►
◄cwm_enabledtrue►
◄smc_presetOff►
◄smc_lambda6.0►
◄smc_k0.10►
Categorymodel_patches
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| lambda_l | FLOAT | 0.050-0.5–0.5 | [DCW] Low-frequency correction strength (x0_pred). Positive: push x0_pred toward x_t (more signal). Negative: push away from x_t (less signal). Active mainly in EARLY denoising steps. Start: 0.04–0.07 for DDPM/EDM; ~2× for Flux/Flow. Set 0.0 to disable DCW low-freq correction. |
| lambda_h | FLOAT | 0.010-0.3–0.3 | [DCW] High-frequency correction strength (x0_pred). Positive: push x0_pred toward x_t (more detail). Negative: push away from x_t (less detail). Active mainly in LATE denoising steps. Start: 0.008–0.015 for DDPM/EDM; ~2× for Flux/Flow. Set 0.0 to disable DCW high-freq correction. |
| dcw_enabled | BOOLEAN | true | [DCW] Toggle SNR-t bias correction on/off. |
| alpha_l | FLOAT | 0.00-1–2 | [CWM] Low-frequency CFG boost strength. Scales the LL guidance band relative to base CFG scale. Positive: amplify coarse structure/composition guidance in early steps. Negative: suppress low-freq guidance. 0.0 = standard CFG for this band. Suggested start: 0.1–0.3. Flow models (Flux): try 0.2–0.5. |
| alpha_h | FLOAT | 0.00-1–2 | [CWM] High-frequency CFG boost strength. Scales the HH guidance band relative to base CFG scale. Positive: amplify edge/texture/detail guidance in late steps. Negative: suppress high-freq guidance. 0.0 = standard CFG for this band. Suggested start: 0.1–0.2. Excessive values cause over-sharpening. |
| cwm_enabled | BOOLEAN | true | [CWM] Toggle CFG Wavelet Mixing on/off. |
| smc_preset | COMBO | Off | [SMC] Sliding Mode Control CFG preset. 'Off' — SMC disabled entirely. 'Auto' — auto-detect model family, apply paper defaults. Named presets — paper-verified (λ, k) per model family. 'Custom' — use smc_lambda / smc_k sliders below. SMC runs inside the CWM hook (sampler_cfg_function). It corrects guidance error quality BEFORE CWM distributes it across frequency bands. If cwm_enabled=False, SMC still activates the cfg hook and runs without wavelet overhead (pure SMC-CFG mode). |
| smc_lambda | FLOAT | 6.00.5–30 | [SMC] Shape parameter λ of the sliding mode surface. Only used when smc_preset = Custom. Paper recommends 2–8. Extreme values distort the manifold. |
| smc_k | FLOAT | 0.100–5 | [SMC] Switching gain k. Only used when smc_preset = Custom. Low k → better realism, weaker text alignment. High k → stronger text alignment, risk of chattering. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |