Pre CFG channel multiplier
Multiply the latent channels that are misbehaving
- model
- MODEL
CFG treats every latent channel the same - one global scale, applied to everything. But your model's latent space isn't uniform: on SDXL's four channels, one might carry the coarse structure and another the color, and sometimes it's a single channel that's overcooked or undercooked. Pre CFG channel multiplier is the surgical option: four multipliers, one per latent channel, applied to the predictions before CFG runs.
The mechanism is about as direct as this pack gets. The node patches the pre-CFG stage and, for each channel of the cond and/or uncond prediction, multiplies it by your value - provided the current sigma is inside your active window. channel_1 through channel_4 are the multipliers (default 1 = untouched, range −10 to 10, so you can even flip a channel negative). The selection enum decides which predictions get multiplied: both, cond only, or uncond only. And start_at_sigma (default 15) / end_at_sigma (default 1) window the whole thing, so you can confine the tweak to, say, the mid-range structure-building steps and leave the finish alone.
So what's the actual use? Two real ones. First, diagnostics: this is the direct way to learn what each channel does on your checkpoint. Set one channel to 0 on a fixed seed and watch what disappears - that's how you discover which channel is "structure" and which is "color" for your model, and that knowledge transfers to the rest of the pack's per-channel nodes. Second, correction: if you've identified that a specific channel is driving an artifact (oversaturated color, or a texture that won't stabilize), knock that channel's multiplier down instead of fighting it with the global CFG scale.
Where it sits in the pack: it's the manual counterpart to Pre CFG automatic scale, which derives per-channel scales from the data automatically. Automatic is great for "set and forget"; this node is for when you know exactly which channel is the problem and want to grab the dial yourself. Both can live in one chain - measure with automatic, then fine-tune with a multiplier downstream.
Inputs that matter:
channel_1–channel_4- the per-channel multipliers.selection- apply to both, cond only, or uncond only.start_at_sigma/end_at_sigma- the active sigma window.
The output is the patched MODEL. Install with the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Extraltodeus/pre_cfg_comfy_nodes_for_ComfyUI
or via ComfyUI Manager searching pre_cfg_comfy_nodes_for_ComfyUI, then restart. No models, no extra dependencies.
One caveat: the multiplier assumes your model has four latent channels. That's true for SDXL and SD 1.5, but if you're on a model with a wider latent, this node's fixed four multipliers won't line up - the wider channel selector family exists precisely because channel counts vary. For four-channel models, though, this is the precision tool.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| channel_1 | FLOAT | 1.00-10–10 | — |
| channel_2 | FLOAT | 1.00-10–10 | — |
| channel_3 | FLOAT | 1.00-10–10 | — |
| channel_4 | FLOAT | 1.00-10–10 | — |
| selection | COMBO | 3 options: both, cond, uncond | |
| start_at_sigma | FLOAT | 15.000–100 | — |
| end_at_sigma | FLOAT | 1.000–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |