Product Image Sort
Sort a Pile of Product Shots Into On-Model / Off-Model in One Go
- images
- product_images
- on_model_images
- other_images
- report
- product_count
- on_model_count
- other_count
NS Product Image Sort is the sibling of this pack's Product Gallery Scrape, minus the scraping. Feed it any IMAGE batch - generated shots, hand-collected references, whatever - and it splits the pile into three categories: product packshots, shots with a person wearing/using the product, and everything else. Same zero-shot CLIP classifier, same three-way split, no network involved.
When would you reach for it? The classic case is a batch of AI-generated product renders. You generate a dozen variations of a teal mug and you want the "mug alone" shots separated from the "hand holding mug" shots before they feed different pipeline branches - say, the clean packshot to the hero slot and the lifestyle shot to the on-model slot. It's also the natural cleanup step after a gallery scrape: run the scraped output through the sort if the page's classification was off, or sort your own downloaded references the same way.
How it works
The node takes the input IMAGE tensor, converts it to PIL images, and runs each one through zero-shot CLIP against three category prompts. openai/clip-vit-base-patch16 is the default checkpoint (downloaded on first run); you can swap in another Hugging Face CLIP model via the clip_model field. Each image gets a verdict plus a confidence and a margin, all recorded in the report output so you can see why something landed where it did.
The category assignment is per-image, not per-batch - a mixed batch splits correctly.
Inputs and outputs
Required: images (any IMAGE batch). Optional: clip_model.
Outputs are the three IMAGE batches - product_images, on_model_images, other_images - a report string (per-index verdicts with confidence), and three counts: product_count, on_model_count, other_count.
Same caveat as its sibling: an empty category comes out as a white placeholder frame, not an empty batch. Always read the count outputs before wiring an empty-looking category downstream, or you'll condition on a blank image and wonder why.
Install and setup
Ships in the Symbiotica pack. ComfyUI Manager → search "Symbiotica" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/symbiotica-ai/comfyui-nodes.git symbiotica
pip install -r symbiotica/requirements.txt
Restart. First run downloads the CLIP checkpoint. No API key, no ffmpeg - this is a fully local utility node.
Troubleshooting
- First run feels stuck - CLIP checkpoint download. Watch the console for the Hugging Face progress.
- A category is full of the wrong thing - zero-shot CLIP is decent but not magic. The
reportshows each verdict's confidence and margin; the low-margin ones are where misclassification happens. Try a strongerclip_model, or accept that this sorts "good enough for most batches." - The whole batch lands in one category - if every image is genuinely similar (all packshots), that's correct behavior. If it's wrong for every image, the
clip_modelmay have failed to load and the node is still running with a fallback - check the console for warnings.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| clip_modelopt | STRING | openai/clip-vit-base-patch16 | Hugging Face CLIP checkpoint for the classifier. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| product_images | IMAGE | — |
| on_model_images | IMAGE | — |
| other_images | IMAGE | — |
| report | STRING | — |
| product_count | INT | — |
| on_model_count | INT | — |
| other_count | INT | — |