Nodes/Nukun_ComfyUI_Nodes/Conditioning Normalize Magnitude To Empty (Nukun)
ComfyUI Node

Conditioning Normalize Magnitude To Empty (Nukun)

Give every token the same volume as the empty prompt

By OnekoSL·Created 3 months ago·Updated 11 days ago· 1
Conditioning Normalize Magnitude To Empty (Nukun)
  • conditioning
  • empty_conditioning
  • conditioning
enabledtrue

Every word in a prompt doesn't pull the same weight, and a lot of the time that's fine - but sometimes it's the whole problem. Some tokens come out of the text encoder with outsized magnitudes, dominating the image no matter how you phrase things. NukunConditioningNormalizeMagnitudeToEmpty normalizes your conditioning's token magnitudes to match those of an empty conditioning, so every token sits at the same "volume" the model was calibrated for.

It's a calibration tool more than a creative one: it won't change what your prompt says, it changes how loud each token is. Part of the Nukun conditioning family, and best used when you're chasing prompt-bleed or over-strong tokens rather than when you're just mixing styles.

How it works

It takes two conditionings:

  • conditioning - the prompt you want to normalize.
  • empty_conditioning - the reference, typically the encoding of an empty/blank prompt from the same CLIP.

The node measures the per-token magnitudes in your conditioning, then rescales them to match the corresponding magnitudes in the empty conditioning. Tokens that were firing way too hot get pulled down to the reference level; tokens that were under-firing get raised. The enabled boolean (default on) is your bypass - wire it to a switch or convert it to an input if you want to A/B the normalized vs. raw prompt in the same workflow.

One output, conditioning, straight into the sampler.

Why "to empty"

Empty-prompt conditionings are a meaningful reference point: they're what the model generates in the absence of any prompt - the model's own prior. Matching your prompt's token magnitudes to that prior's magnitudes is a reasonable target for "prompt tokens should influence, not shout." It's a heuristic, not a law, but for tame-and-balanced rendering it's a solid one.

Where it helps

  • Prompt bleed between subjects. If "a red-haired girl, a blue-haired girl" keeps smearing the colors, oversized token magnitudes on key terms are a plausible culprit, and this node's normalization is a cheap experiment.
  • Over-dominant quality tags. The infamous masterpiece, best quality style tags that make everything screech at high weight - normalizing their magnitude relative to empty is one way to keep them influential without letting them run the image.
  • Before/after debugging. Run it through ConditioningAnalyzer first to see the token-norm stats, apply this node, analyze again. If the numbers barely moved, your issue isn't magnitude.

The caveat

This node is deterministic and simple, and that's its limitation: it normalizes everything to one reference, so it can flatten the intentional emphasis you built with (weight:1.4) syntax. If your workflow relies on prompt weights doing real work, test it as an experiment rather than leaving it in the permanent chain. Also - and this is worth stating - empty conditioning must come from the same CLIP/model as the prompt, or the reference magnitudes are meaningless.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/OnekoSL/Nukun_ComfyUI_Nodes.git

Restart ComfyUI or install via ComfyUI Manager ("Nukun").

Bottom line

It's a niche knob, honestly. Most people won't need it daily - but the handful who are fighting token-dominance problems will find it does in one node what hand-tuning per-token weights takes forever to do. Pair it with the pack's ConditioningAnalyzer and you can actually see whether your problem is a magnitude problem before you start fixing it blind.

CategoryNukun/Conditioning

Inputs (3)

NameTypeDefaultDescription
conditioningCONDITIONING
empty_conditioningCONDITIONING
enabledBOOLEANtrue

Outputs (1)

NameTypeDescription
conditioningCONDITIONING