Scale Embeddings (experimental)
A scaling knob that (probably) does nothing — here's why
- clip_vision_output
- clip_vision_output
Scale Embeddings multiplies every value in a CLIP vision embedding vector by a single scale factor. One input, one number, one output. And here's the thing nobody tells you about this node: for everything this pack actually does with embeddings, it changes nothing.
I want to be fair before I dunk on it. The node works exactly as written - it flattens the vector, multiplies by scale, reshapes it back, and hands you a valid CLIP_VISION_OUTPUT. If you look at the raw numbers, scaling happened. The problem is that the whole pack measures similarity with cosine similarity, and cosine similarity is invariant to scaling a vector by a positive constant. Scale your query embedding by 2, 0.5, or 1.37 and the dot product scales the same way the norm does - the ratio comes out identical. Every search ranking and every Compare Embeds score will be byte-for-byte the same.
The author's own label says "experimental," and this is the experiment: it's the one node where the code is doing exactly what it says and the pack's own math makes it a no-op in the mainline workflows.
The inputs
- clip_vision_output - any CLIP vision output.
- scale - a FLOAT, default 1.0, step 0.01.
Output is a clip_vision_output you can wire anywhere a CLIP vision output goes.
Is there any case where it matters?
Two honest ones. First, if you ever bypass the pack's cosine math and feed scaled embeddings into something that treats vector magnitude as meaningful - a custom node, an external tool - then yes, scale does something real. Second, cosine similarity treats negative scaling as a flip (multiply by -1 and "similar" becomes "anti-similar"), so a negative scale genuinely changes rankings. Neither case is what a beginner will be doing. For the normal Image Searcher → Result Browser path, this knob is decorative.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/MoonMoon82/ClipVision_Tools
cd ClipVision_Tools
python -m pip install -r requirements.txt
Or ComfyUI Manager → "ClipVision_Tools" → restart. Deps: orjson, pillow-heif.
Bottom line
Don't reach for this node expecting to tune your search sensitivity - the knob doesn't reach the math. If you're getting too many or too few results, adjust the query (different reference image, or a threshold on the Advanced Result Browser) rather than scaling embeddings. Scale Embeds is a building block for people doing their own embedding math, not a user-facing tuning control. Knowing that will save you the exact twenty minutes I spent testing it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_vision_output | CLIP_VISION_OUTPUT | — | |
| scale | FLOAT | 1.00 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| clip_vision_output | CLIP_VISION_OUTPUT | — |