Nodes/Vector_Sculptor_ComfyUI/Conditioning normalize magnitude to empty
ComfyUI Node

Conditioning normalize magnitude to empty

Put your conditioning on a leash

By Extraltodeus·Created 2 years ago·Updated 2 years ago· 127
Conditioning normalize magnitude to empty
  • conditioning
  • empty_conditioning
  • CONDITIONING
enabledtrue

Every prompt in ComfyUI is a bunch of vectors, and those vectors have a magnitude - how loud the conditioning is. Push it too hot and your image gets oversaturated and mushy; too cold and it goes bland. This node from the Vector Sculptor pack rescales your conditioning's magnitude to match a reference: the conditioning you get from an empty, blank prompt.

Why an empty conditioning as the target? That's the "unconditional" baseline - what the model does when you ask for nothing. It's the natural reference point for "a normal amount of conditioning." If your prompt is running away with color and contrast, clamping its per-token magnitude to the empty prompt's levels is a way to pull it back toward balanced.

How it works

For every token vector in your conditioning, the node normalizes it to unit length and then multiplies it by the magnitude of the corresponding token from the empty conditioning. That changes volume without changing direction - the prompt says the same thing, just at a baseline loudness. On SDXL it treats the two encoder halves (clip_l and clip_g) separately, which the README specifically calls out, because the two halves live at very different scales inside the 2048-dim vector.

You have to supply the reference yourself: empty_conditioning is a normal CONDITIONING, so wire in the output of a plain CLIPTextEncode with an empty (or near-empty) prompt. There's also an enabled BOOLEAN (defaults to true) so you can A/B test the whole thing without ripping wires out - when it's off, the conditioning passes through untouched.

Inputs and output

  • conditioning - the prompt conditioning you want to normalize.
  • empty_conditioning - the unconditional; encode a blank string to make it.
  • enabled - true/false pass-through switch.

Output is a CONDITIONING, same shape as the input, wired straight into the sampler.

Installing it

It's one of five nodes in the pack, so one install gets them all:

cd ComfyUI/custom_nodes
git clone https://github.com/Extraltodeus/Vector_Sculptor_ComfyUI

then restart ComfyUI, or grab it through ComfyUI Manager by searching Vector_Sculptor_ComfyUI. No dependencies, no models to download - pure torch math over the conditioning tensor.

The honest catch

The author's own note in the README is worth quoting because it's refreshingly candid: "I have no idea if this is an actually good idea. It tends to give more balanced images regarding the colors and contrasts but also gave me more molten people." So treat it as an experiment, not a fix. Balanced color and contrast, yes; occasional melted faces, also yes. That's exactly why the enabled toggle exists - run it, flip it off, keep whichever looks less like a Salvador Dalí painting. It's also, like the rest of this pack, a CLIP-era tool: it only makes sense on SD 1.5/SDXL-style conditionings, not the LLM-encoded models that replaced CLIP.

Categoryconditioning

Inputs (3)

NameTypeDefaultDescription
conditioningCONDITIONING
empty_conditioningCONDITIONING
enabledBOOLEANtrue

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING