Commit Graph

3 Commits

Author SHA1 Message Date
612e7e973f Fix sigma-scaling bug causing noisy images
ComfyUI's args["cond"]/["uncond"] are (x - denoised), which are
sigma-scaled. At late denoising steps (sigma~0.01), the fixed K=0.2
correction was 200x the signal magnitude, destroying the image.

Fix: compute SMC in denoised space using args["cond_denoised"] and
args["uncond_denoised"], which have consistent magnitude across all
sigma values — matching the paper's noise-prediction space.

Also fixes first-step behavior to match the original paper (SMC
correction applied from step 0, not step 1).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:33:05 +01:00
3953d97163 Add detailed README with SVG diagrams and Apache 2.0 license
Includes algorithm comparison, node wiring, and parameter guide
diagrams. SVGs use <picture> tags for GitHub compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:15:07 +01:00
a79c5163a1 Initial implementation of SMC-CFG Ctrl ComfyUI node
Implements the Sliding Mode Control CFG algorithm from the paper
"CFG-Ctrl: A Control-Theoretic Perspective on Classifier-Free Guidance" (CVPR 2026)
as a ComfyUI model patch node.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:10:07 +01:00