Channel Incremental Constrained CFG Guider
Experimental image control you probably don't need yet
- model
- positive
- negative
- vae
- orig_image
- GUIDER
This is the "experimental" node of the pack, and the category name is doing real work: Channel Incremental Constrained CFG Guider is a custom sampling guider - the thing ComfyUI uses to steer denoising toward a prompt - that also tries to keep the output close to an original image while it's being generated. It's a research-y idea from the pack author, filed under "this might work," and you should treat it accordingly.
First, what a guider is. In ComfyUI, CFG works by predicting denoising twice - once conditioned on your prompt, once without - and amplifying the difference. The GUIDER object you feed a KSampler-style node controls that whole dance. The stock CFGGuider does the standard thing; this one wraps it and adds a constraint. Its trick: on every sampling step it decodes the current denoised prediction back to an image, compares it to your orig_image, and forcefully pushes the result back toward the original - but only on the channel-averaged difference (hence "channel"), and with strength that ramps up as sampling progresses (hence "incremental," via a (1-timestep)² scaling). The idea is a soft "stay near this image" leash that tightens toward the end of generation.
The inputs
It's a full guider setup, so it asks for everything a sampler needs plus its extra knob:
- model, positive, negative, cfg - the standard guider inputs (cfg default 8).
- vae - required, because the constraint math decodes and re-encodes the image every step. This is where the cost lives: a VAE round-trip per sampling step is expensive.
- orig_image - the image to constrain toward.
- constraint_strength - 0 to 1, default 1. How hard the leash pulls. This is the knob you'll actually tune; at 0 it's effectively a normal CFG guider.
One output: GUIDER, which plugs into a sampling node that accepts a guider input.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack
cd duanyll_nodepack && pip install -r requirements.txt
or ComfyUI Manager → "Duanyll Nodepack" → install → restart.
Why you should mostly leave it alone
The honest take: this is not a finished feature. It's an experimental idea that costs a VAE decode/encode on every single sampling step - a massive slowdown - and the "channel-averaged" constraint means it only preserves per-channel brightness/color structure, not pixel-level detail. For keeping an output close to a source image, you have far better, faster, battle-tested options: img2img with denoise strength, or ControlNet, both of which the KB and community treat as solved problems. Where this node sits is somewhere between "interesting experiment" and "not ready," and the author marked it experimental for exactly that reason. Read it as a peek at how guider internals work, try it once out of curiosity, and reach for established tools when you actually need image control.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| cfg | FLOAT | 8.00–100 | — |
| vae | VAE | — | |
| orig_image | IMAGE | — | |
| constraint_strength | FLOAT | 1.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| GUIDER | GUIDER | — |