Latent Normalize (CCN)
Fifteen ways to rebalance a latent, and when each one helps
- latent
- latent
Latent Normalize is the swiss-army knife of the pack's latent tools: one node, fifteen normalization methods, a strength knob, and a per-channel option. Where Latent Clamp is a blunt floor-and-ceiling, this lets you reshape the distribution of latent values in gentler, more targeted ways - and it was built to share its method list with the pack's Conditioning Normalizer, so what you learn here transfers to the conditioning side too.
The idea is that latent distributions drift: too much guidance pushes values up, certain samplers skew them, heavy tinkering makes them lopsided. Normalizing rebalances the distribution before decode, which can pull back artifacts, restore contrast behavior, or just keep a workflow honest across runs. Results vary wildly by model - this is tinker territory, not a guarantee.
The methods that matter (the full list is 15)
The dropdown runs from "none" through an escalating set of options:
- max_norm - divide by the max absolute value, so the peak lands at ±1. Simple, effective, the usual first stop.
- std_norm / std_half - divide by standard deviation (full, or gentler at 2×). Evens out how spread the values are.
- zscore / zscore_avg / zscore_half / slight_z - subtract the mean, divide by std, in increasingly cautious versions.
slight_zis 20% z-score / 80% max-norm;zscore_avgaverages the two. Good when you want centering and scaling. - mean_restore - normalize the spread but put the mean back where it started. The author's code comments note the earlier form of this was a mathematical no-op; the current one actually does something.
- range - scale everything to [−1, 1].
- clamp_1 through clamp_4 - the same clamp idea as Latent Clamp, at different cutoffs, but here with a strength knob so you can blend it.
strength (default 1) scales how hard the normalization applies; negative values invert the effect. per_channel normalizes each channel independently instead of the whole tensor - and per the source, it works for both image latents (B, C, H, W) and video latents (B, C, T, H, W), which matters if you're tinkering on Wan.
How to actually use it
Start with max_norm or std_norm at strength 1 and see if the artifact you're chasing moves. If the result looks over-processed, drop the strength rather than switching methods. If your issue is specifically about one color axis or channel, flip per_channel on. And because the methods mirror Conditioning Normalizer, a normalization that fixes your latents can often be applied to your conditioning with the same settings - one tuning session, two problems.
Install
Same pack, same ritual:
cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes
restart, or Manager → ComfyCollectorNodes. Pure torch, no dependencies. A debug toggle prints diagnostics to console. The honest advice: don't normalize every workflow just because the option exists - a healthy latent doesn't need surgery. But when a run comes out of a long tinker chain looking wrong in ways you can't prompt your way out of, this is the first tool to try.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| method | COMBO | none | 15 options: none, max_norm, std_norm, std_half, zscore, zscore_avg, +9 |
| strength | FLOAT | 1.0000-100–100 | — |
| per_channel | BOOLEAN | false | — |
| debugopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |