Product Gallery Scrape
Turn Any Product Page Into Clean, Sorted Reference Images
- product_images
- on_model_images
- other_images
- summary
- report
- product_count
- on_model_count
- other_count
Ever needed reference images of a product and found yourself screenshotting an e-commerce page, cropping out the badges and the "Add to Cart" button by hand? NS Product Gallery Scrape does the whole job: it fetches a product page, pulls the gallery images, and sorts them into three piles - shots of the product alone, shots with a model wearing/using it, and everything else (packaging, banners, lifestyle clutter).
It exists because "product" is not a clean signal in e-commerce markup. Alt text is empty, image filenames are arbitrary numbers, and page structure varies from store to store. So the node doesn't trust the page - it trusts a vision model. That's the clever bit and it's worth understanding before you use it.
How it works
First, scraping: the node reads the page's structured data (JSON-LD Product markup) to find the gallery, with a DOM fallback for stores that don't ship JSON-LD. It's SSRF-guarded - the code checks that the URL resolves to a public http/https target, so you can't point it at an internal address. Images are downloaded with a 25 MB and 40-megapixel cap (oversized ones are dropped rather than decoded - that's a decompression-bomb guard).
Then, sorting: with classifier set to clip (the default), each image goes through zero-shot CLIP (openai/clip-vit-base-patch16, downloaded on first run) to decide product vs. on-model vs. other. Set classifier to off and everything lands in product_images - useful when you know the page and just want the batch without the download wait.
Inputs and outputs
Required: url and classifier. Optional: clip_model (a different Hugging Face CLIP checkpoint), max_images (cap on downloads, 1–32, default 12), and image_size (longest side in pixels, downscale-only, default 1024 - set lower for fast upstream work).
Outputs: three IMAGE batches - product_images, on_model_images, other_images - plus a summary (a product description built from the page, ready to feed a script LLM), a report (per-image verdicts with confidence, for debugging), and three INT counts: product_count, on_model_count, other_count.
One quirk to know: empty categories emit a white placeholder frame, not an empty tensor. Gate your downstream logic on the count outputs so a placeholder doesn't get treated as a real image.
Install and setup
This is part of the Symbiotica pack. ComfyUI Manager → search "Symbiotica", 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 with the CLIP classifier downloads the model - a few hundred MB, one time. No API key needed; this node is fully local.
Troubleshooting
- "no gallery images found" - the page blocked the scraper (403) or has no discoverable gallery. Try a different store or check the URL is public. Some shops hard-block scrapers.
- First run is slow - that's the CLIP model downloading, then CPU zero-shot inference on up to 12 images. It's a one-time cost.
- Everything lands in "other" - the CLIP classifier is zero-shot; obscure or heavily branded product shots can confuse it. Switch
classifiertooffand sort manually, or try a strongerclip_model. - Images look tiny - that's
image_sizedownscaling (downscale-only, never upscale). Raise it if you need bigger refs, but keep it small if you're just feeding a ControlNet or an edit model.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | Product page URL (public http/https). | |
| classifier | COMBO | clip | clip: split by content with zero-shot CLIP (downloads the model on first run). off: everything lands in product_images. |
| clip_modelopt | STRING | openai/clip-vit-base-patch16 | Hugging Face CLIP checkpoint for the classifier. |
| max_imagesopt | INT | 121–32 | Cap on downloaded gallery images. |
| image_sizeopt | INT | 1024256–4096 | Longest side per image (downscale only). |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| product_images | IMAGE | — |
| on_model_images | IMAGE | — |
| other_images | IMAGE | — |
| summary | STRING | — |
| report | STRING | — |
| product_count | INT | — |
| on_model_count | INT | — |
| other_count | INT | — |