Nodes/ComfyUI-PixlStash/PixlStash Semantic Search
ComfyUI Node

PixlStash Semantic Search

'red dress at golden hour' just works

By Pikselkroken·Created 4 months ago·Updated 6 days ago· 7
PixlStash Semantic Search
  • pixlstash_project
  • pixlstash_set
  • pixlstash_character
  • image
  • mask
  • pixlstash_project
  • pixlstash_set
  • pixlstash_character
  • batch_size
query
limit20
threshold0.50

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.

CategoryPixlStash

Inputs (6)

NameTypeDefaultDescription
querySTRINGText prompt to search for semantically similar pictures.
limitINT201–500Maximum number of pictures to return.
thresholdFLOAT0.500–1Minimum cosine-similarity score required to include a picture in the results.
pixlstash_projectoptPIXLSTASH_PROJECTWire from a Project Loader to restrict the search.
pixlstash_setoptPIXLSTASH_SETWire from a Set Loader to restrict the search.
pixlstash_characteroptPIXLSTASH_CHARACTERWire from a Character Loader to restrict the search.

Outputs (6)

NameTypeDescription
imageIMAGE
maskMASK
pixlstash_projectPIXLSTASH_PROJECT
pixlstash_setPIXLSTASH_SET
pixlstash_characterPIXLSTASH_CHARACTER
batch_sizeINT