Nodes/Vector_Sculptor_ComfyUI/CLIP Vector Sculptor text encode
ComfyUI Node

CLIP Vector Sculptor text encode

Your prompt, pushed toward (or away from) its own meaning

By Extraltodeus·Created 2 years ago·Updated 2 years ago· 127
CLIP Vector Sculptor text encode
  • clip
  • Conditioning
  • Parameters_as_string
text
sculptor_intensity1.00
sculptor_method
token_normalization

The flagship node of the Vector Sculptor pack, and the honest pitch is in the name: it sculpts the vectors that your text becomes before the sampler ever runs. Swap it in where you'd normally put a CLIPTextEncode and you can make the same prompt, same seed, same model come out noticeably more creative - or noticeably more literal. No API, no model download, no extra inference cost. It just rewrites your prompt's token embeddings.

What it actually does

ComfyUI's text encoders work by looking up each word of your prompt in a table of learned vectors (the CLIP embedding space). Vector Sculptor reaches into that same table before encoding. For every token in your prompt it finds the nearest neighbors by cosine similarity - the words CLIP thinks mean something like yours - and walks outward while the similarity keeps dropping. Those neighbors form a "direction" in vector space that represents the general concept your prompt is drifting toward. Then:

  • forward subtracts that direction, nudging your prompt away from the cluster's center so it lands somewhere nearby but not identical - more variety, "unpotatoes" faces, and it's the setting the author says cures the always-the-same-face effect.
  • backward adds it, pushing your prompt deeper into the middle of its concept - more precise adherence.

Everything is rescaled back to the original magnitude afterward, so the effect is a direction change, not a loudness change.

The inputs that matter

  • sculptor_intensity (0–10, default 1) - how hard the nudge lands. Forward is best 0–1 for photorealistic work and 1–2 for more artistic results; the README warns that forward above 1 starts having "adversarial effects" and overreaches your meaning.
  • sculptor_method - forward, backward, maximum_absolute, plus an undocumented fourth, add_minimum_absolute. maximum_absolute is the fun one: it normalizes the neighbor vectors and keeps the values furthest from zero, which makes simple subjects more complex and complex prompts more chaotic. Author's verdict: mostly for fun, occasionally gorgeous on abstract concepts.
  • token_normalization - reworks the magnitude of each token vector. mean (set every token to the average importance) is the one the author recommends; set at 1, default * attention and friends are there for experiments.

Outputs are a Conditioning you wire straight into the sampler, exactly like a normal text encode, plus a Parameters_as_string that echoes your settings - handy if you like baking prompt metadata into your saved images.

Installing it

Install once and every node in the pack comes with it:

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

then restart ComfyUI. Or use ComfyUI Manager's Custom Nodes Manager and search for Vector_Sculptor_ComfyUI. There's no requirements.txt and no model files to fetch - the whole pack is one pure-PyTorch nodes.py, so the install is genuinely a clone-and-restart.

Where people get burned

Set intensity to 0 and token_normalization to none and you get a default Comfy conditioning - useful as your "off" switch for A/B tests. The author's recommended starting point is forward at 0.5 for the positive prompt, "stay in place" (i.e. a plain encode) for the negative, with mean normalization on the negative to cut down burned images.

One thing to know going in: this is a 2024-era tool built around the CLIP token table, so it only does anything on CLIP-encoded models - SD 1.5, SDXL, Illustrious and friends. On Flux or the newer LLM-encoded models there's no CLIP vocabulary to sculpt, so the node is meaningless there. It's also not free of encode time on absurdly long prompts - the author measured roughly 6 seconds of encoding on an RTX 4070 for a page of text, but only when the prompt changes, and it never touches sampling speed. That's a fair trade for the "same prompt, different result" party trick it enables.

Categoryconditioning

Inputs (5)

NameTypeDefaultDescription
clipCLIP
textSTRING
sculptor_intensityFLOAT1.000–10
sculptor_methodCOMBO4 options: forward, backward, maximum_absolute, add_minimum_absolute
token_normalizationCOMBO7 options: none, mean, set at 1, default * attention, mean * attention, set at attention, +1

Outputs (2)

NameTypeDescription
ConditioningCONDITIONING
Parameters_as_stringSTRING