Nodes/ClipVision_Tools/Result Browser
ComfyUI Node

Result Browser

Flip through your image search results, one image at a time

By MoonMoon82·Created 11 months ago·Updated 10 months ago· 10
Result Browser
  • results
  • IMAGE
  • FILENAME
  • SCORE
image_index0
matchfirst

Result Browser is where the search actually pays off: it turns a SRESULTS output from Image Searcher into a real image you can look at, plus the filename and score for that image. If Image Searcher is the engine, this is the steering wheel - you scroll through ranked matches by changing one number.

The workflow is GenerateDB → LoadDB → Image Searcher → Result Browser, and if you've followed the README's example this node is the final stop. Run the graph, look at image #0 (the best match), bump image_index to 1, run again, and so on down the list. It's deliberately manual - it outputs a single image at a time so you can wire it into anything that consumes one image: a viewer, a save node, a further image-pipeline stage.

The inputs that matter

  • results - the SRESULTS output from Image Searcher.
  • image_index - which ranked slot to output. 0 is first, whatever "first" means per your match setting.
  • match - the sort direction, and this trips people up. first means index 0 is the most similar image; last means index 0 is the least similar. It's "sort order of images to output," not "first vs. last result." Set it once and don't assume.

The node sorts the distances internally (argsort), picks the slot, opens the actual image file, applies any EXIF rotation, and returns it. Because it opens files from disk, the images have to still be where the database expects them - which means the path_to_images_folder you typed into LoadDB has to line up with reality.

The outputs

Three, and they all matter:

  • IMAGE - the picture, ready to preview or feed onward.
  • FILENAME - the stored relative path, useful to display or to feed into logic ("skip anything with 'watermark' in the name").
  • SCORE - the cosine similarity for that slot, so you can see how confident the search is.

Wire IMAGE to a Preview/Save, and hook FILENAME and SCORE into a "Show any" text node if you want to see the whole package at once. Note the filename comes back as a plain string, not a full absolute path - that's by design, since the DB stores paths relative to the base folder.

Installing it

Same as the pack: ComfyUI Manager → search "ClipVision_Tools" → install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/MoonMoon82/ClipVision_Tools
cd ClipVision_Tools
python -m pip install -r requirements.txt

Light deps (orjson, pillow-heif), no extra downloads.

Gotchas

  • File-not-found errors mean the base path or the files moved - see EditResults' "replace" method to re-point paths without regenerating the DB.
  • Manual browsing is the point, not a bug: one image per run is what makes it composable. If you need a stack of images at once, that's the Advanced Result Browser's job (it outputs a whole batch).
  • last is genuinely useful: want the least similar image (for negative-reference debugging, say)? Set match to last. The direction is in your hands, just don't expect the node to remember which way you set it last time.
CategoryClipVisionTools

Inputs (3)

NameTypeDefaultDescription
resultsSRESULTS
image_indexINT00–18446744073709550000first result to output
matchCOMBOfirstSort order of images to output

Outputs (3)

NameTypeDescription
IMAGEIMAGE
FILENAMESTRING
SCOREFLOAT