Condition 2 Embeddings
Search your image database with a text prompt instead of a picture
- conditioning
- CLIP_VISION_OUTPUT
Condition 2 Embeddings is the node that lets you search your image database by typing a description instead of dragging in a reference image. "Find me the photos that look like 'sunset over a harbor'" - that's this node's whole job.
It does this by taking the output of a plain CLIP Text Encode node and turning it into the same shape of data that a CLIP Vision Encode node produces. Which is a sneaky trick, and it only works because CLIP was trained to put images and text in a shared vector space - the same alignment that makes text prompts drive image generation in the first place.
How it works
A CLIP text encoder returns conditioning, and inside that conditioning there's a pooled_output - a single vector summarizing the whole prompt. Cond2Embeds grabs that vector, stuffs it into a CLIP_VISION_OUTPUT under image_embeds, and hands it to you. Feed that into Image Searcher and it scores your database against the text instead of an image.
Here's the catch the README is honest about: not every text encoder is compatible with every vision encoder. The shapes have to match. The author's tested combo is the clip_g text encoder paired with the CLIP-ViT-bigG-14-laion2B-39B-b160k vision model - you'll usually run into this if you're on SD 1.5-era CLIP-L text encoders against a bigG vision DB. That's exactly what the EmbedsInfo node is for: it prints the embedding shape so you can check whether your text encoder and vision model can even talk to each other. Same shape, go. Different shape, swap one side.
The input that matters
Just one real wire:
- conditioning - from a CLIP Text Encode node, using a text encoder whose pooled output shape matches your DB's vision model.
Output is CLIP_VISION_OUTPUT, which wires straight into Image Searcher's clip_vision_output socket or into Compare Embeds.
Installing it
Same as the rest of the pack - ComfyUI Manager, search "ClipVision_Tools", install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/MoonMoon82/ClipVision_Tools
cd ClipVision_Tools
python -m pip install -r requirements.txt
No extra model downloads beyond the CLIP vision model you're already using for the database.
Common issues
- Results look random: your text encoder and the DB's vision model live in different vector spaces. Run EmbedsInfo on both sides and compare shapes.
- Text search feels worse than image search: normal. A prompt is a lossy summary of a picture; a reference image is the picture. Text retrieval here is "good enough for sorting a folder", not "as precise as image-to-image."
- Zero result improvements after tweaking the prompt: CLIP's text space is coarse. A few strong nouns beat a paragraph - this is the same lesson as prompt engineering in general, just applied to retrieval.
One honest caveat: this whole text-search path is the pack's experimental corner, and the author says so. If it works with your encoder pairing, great - it's genuinely useful for browsing a big reference library by concept. If your encoder shapes don't line up, don't fight it; grab a compatible model.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP_VISION_OUTPUT | CLIP_VISION_OUTPUT | — |