PixlStash Semantic Search
'red dress at golden hour' just works
- pixlstash_project
- pixlstash_set
- pixlstash_character
- image
- mask
- pixlstash_project
- pixlstash_set
- pixlstash_character
- batch_size
Type a sentence, get back pictures that mean the same thing. PixlStash Semantic Search runs your query through PixlStash's semantic search - CLIP-style text-to-image embedding comparison - and returns matching vault pictures as IMAGE/MASK tensors, ready to feed an edit, an outpaint, or a fresh generation. If you've ever stared at 5,000 untitled PNGs wishing you could ask "where's the shot with the motorcycle in the rain?" this is the node you were waiting for. It's why the pack's headline example is a search that feeds an image-edit pipeline.
How it works
The node sends your query to PixlStash's search endpoint. The server embeds the text and ranks vault pictures by cosine similarity of their CLIP embeddings - the same family of technique the KB's concepts notes underpins text-image understanding, just pointed at your own library instead of a training set. You get back the top matches as a batch, decoded the same way the Picture Loader decodes, including the MASK output for any alpha-channel sources.
Two knobs control how picky it is:
threshold(default 0.5) - minimum cosine similarity a picture must hit to make the cut. Start around 0.5 and adjust based on how noisy your results are.limit(default 20, up to 500) - how many pictures to return.
You can also narrow the search by wiring pixlstash_project, pixlstash_set, or pixlstash_character from the loaders - same filter pattern as every search node in this pack.
Inputs and outputs
Required: query (your text), limit, threshold. Optional: the three filter wires.
Outputs: image, mask, pass-through pixlstash_project/pixlstash_set/pixlstash_character, and batch_size (INT) so you know how many results came back.
Realistic expectations
Semantic search is great at meaning and mediocre at exactness. It'll find "a person reading a book under a tree" reliably; it won't find "picture #4711." Use it to assemble candidate pools, then let a likeness gate or your own eyes do the final pick - the pack's own example workflows lean exactly that way. And note the results are a snapshot at run time: pictures added to the vault but not yet indexed by PixlStash's embedding pipeline won't match until PixlStash finishes with them.
Install and gotchas
Pack install as usual - ComfyUI Manager → ComfyUI-PixlStash, or clone into custom_nodes, restart, set URL/token in Settings > PixlStash. Deps are just requests + Pillow. Requires PixlStash v1.4 (for now, development releases) - older servers will 404 the search endpoint. An empty query raises a hard error rather than searching everything, and if nothing clears your threshold you get a clear "no pictures matched" message - drop the threshold and try again.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| query | STRING | Text prompt to search for semantically similar pictures. | |
| limit | INT | 201–500 | Maximum number of pictures to return. |
| threshold | FLOAT | 0.500–1 | Minimum cosine-similarity score required to include a picture in the results. |
| pixlstash_projectopt | PIXLSTASH_PROJECT | Wire from a Project Loader to restrict the search. | |
| pixlstash_setopt | PIXLSTASH_SET | Wire from a Set Loader to restrict the search. | |
| pixlstash_characteropt | PIXLSTASH_CHARACTER | Wire from a Character Loader to restrict the search. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| pixlstash_project | PIXLSTASH_PROJECT | — |
| pixlstash_set | PIXLSTASH_SET | — |
| pixlstash_character | PIXLSTASH_CHARACTER | — |
| batch_size | INT | — |