Nodes/ComfyUI-CN-Pre/ControlNet Normalize
ComfyUI Node

ControlNet Normalize

Normalize — a quick tone tweak for control maps without re-running the preprocessor

By OKIE5·Created 10 months ago·Updated 10 months ago· 0
ControlNet Normalize
  • image
  • control_image
gamma1.00
gain1.00
bias0.00
invert
clip

Sometimes your control map comes out technically correct but visually weak - a depth pass that's too flat, an edge map that's too faint - and re-running the whole preprocessor with different settings is overkill for what's really just a contrast problem. That's what this node is for: a small, self-contained tone adjustment you drop between your preprocessor and your ControlNet Apply node, no model weights, no backend, nothing that can fail except bad numbers.

What the five knobs do

gamma (default 1, range 0.1-5) applies a power curve - values below 1 brighten the midtones, values above 1 darken them, the same gamma correction concept used everywhere in image processing. gain (default 1, range 0-5) is a straight multiply on pixel values, the fastest way to push contrast up or down. bias (default 0, range -1 to 1) adds a flat offset, shifting the whole image brighter or darker without changing its spread. invert flips black and white - genuinely useful here because different ControlNet checkpoints expect different depth/edge polarity conventions, and this lets you fix a mismatched map without re-running anything upstream. clip controls whether the result gets clamped back into the valid 0-1 range after all that math - leave it on unless you specifically know you want out-of-range values to pass through, since an unclipped result can produce harsh or unpredictable behavior downstream.

The order these presumably apply in (gamma curve, then gain, then bias, with invert and clip as toggles around that) matches the standard tone-adjustment pipeline you'd find in any photo editor - nothing exotic going on here, just exposed as ComfyUI node parameters instead of sliders in a GUI.

Inputs and outputs

Required: image, gamma, gain, bias, invert, clip. No optional inputs - unlike the pack's Loaders nodes, this one doesn't carry a model/clip/vae/control_net passthrough, because it's a pure image-processing utility, not a preprocessor with a bundled loader. The single output is control_image (IMAGE), which slots directly into whatever's downstream - most naturally a ControlNet Apply node, but there's nothing stopping you from using it on any image if you just want a quick gamma/gain/bias adjustment.

Where it fits in your graph

Put it right after your preprocessor's output and before the ControlNet Apply - a depth or Canny map from any of the other CN-Pre-Loaders nodes (or from a different pack entirely) can feed straight into this, get adjusted, and continue on. It's not tied to any specific preprocessor's output; it just expects an IMAGE.

Installing it

Search ComfyUI-CN-Pre in ComfyUI Manager, or manually: cd ComfyUI/custom_nodes && git clone https://github.com/OKIE5/ComfyUI-CN-Pre, then restart. Worth knowing upfront - the pack's README is a one-line stub that doesn't describe any of its actual nodes, so there's no dedicated documentation for this one either. The good news: this is the least risky node to experiment with in the whole pack. No downloads, no external dependencies, nothing that can break beyond "the numbers you typed produce an image that looks wrong," which you'll see immediately in the preview.

Where people get burned

The main trap is clip - turning it off to "see what happens" and then wondering why your ControlNet output looks noisy or unstable further downstream; most ControlNet Apply implementations assume a well-behaved 0-1 image, and an unclipped map full of values outside that range is a plausible, hard-to-trace source of weird generations. Leave clip on by default and only turn it off deliberately. The second thing worth knowing: this node and Levels (Black/White/Gamma), also in this pack, solve the same basic problem - tone-adjusting an image before it goes further down the graph - just with two different mental models. If gamma/gain/bias doesn't click for you intuitively, Levels' black-point/white-point framing (the one every photo editor uses) might be the easier node to reach for instead.

CategoryCtrlNet/Pre

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
gammaFLOAT1.000.1–5
gainFLOAT1.000–5
biasFLOAT0.00-1–1
invertCOMBO2 options: false, true
clipCOMBO2 options: true, false

Outputs (1)

NameTypeDescription
control_imageIMAGE