🔢 Prompt Combinator Export Gallery
Turn a hundred prompt variations into one browsable HTML gallery
- images
- combination_ids
Prompt Combinator is great at handing you every variation at once. The problem it leaves you with is: now what? Scrolling a folder of 400 identically-named PNGs is miserable, and that's exactly the gap this node fills. It takes the batch of images plus the prompts that produced them and writes a single .html gallery you can open in a browser - with the combination ids rendered as filterable columns, so you can slice "all the ones with a cat" and "all the ones with pointy ears" and eyeball the difference in one view. You can try the author's live demo on the pack's GitHub pages.
It's the showpiece of the ComfyUI-Prompt-Combinator pack, announced alongside the pack's June 2024 release. Where the base node is a workhorse you use daily, this one is the "ship it" step - the thing you run when a prompt-matrix render is done and you need to actually make sense of it.
How it works
It's an output node, so it has no outputs of its own - you feed it the three things Prompt Combinator already produced, in matching order:
- prompts - the STRING list from the combinator.
- combination_ids - the ids, same order, so each image gets labeled with exactly which combination made it.
- images - the IMAGE batch from your VAEDecode, in the same order as the prompts. This matters: the node zips them by index and hard-asserts the counts match.
Then the settings that actually change the result:
- embed_all_images_in_html (default true) - base64-embeds every image into a single self-contained HTML file. Turn it off and it writes the images to a
_filesfolder instead and links them. Embedded is easier to move around; linked is far smaller if you have hundreds of images. - image_export_format -
.webp lossy 90default, or lossy 80, lossless webp, or png. For browsing a big matrix, lossy 90 is the right call - lossless png will make the HTML enormous for zero browsing benefit. - filename_prefix (default
gallery) - base name for the html. It auto-increments ifgallery.htmlalready exists.
When it's done you'll find gallery.html in ComfyUI's output/ folder, and it shows up in the UI's output images list.
The gotcha that catches everyone
The images must each have a batch size of 1. The node asserts this with a friendly-enough message ("All images must have a batch size of 1. You must have done something unexpected."), and the usual way to trip it is to decode a whole batch of latents in one VAEDecode and pipe the tensor straight in. If you hit it, split the batch into single images before this node - a batch-split node, or run one image per decode. The node also insists that the number of images equals the number of prompts, so if you changed the combinator's lists after generating, everything falls out of sync and it refuses to run. Regenerate, or accept that the labels will be wrong.
Install
Same as the rest of the pack - ComfyUI-Manager (search "ComfyUI-Prompt-Combinator") or clone into custom_nodes/ and restart:
cd ComfyUI/custom_nodes
git clone https://github.com/lquesada/ComfyUI-Prompt-Combinator.git
No model files, no extra pip packages. It's a numpy + PIL + a couple of HTML templates under the hood, all of which ComfyUI already has.
Worth knowing before you go all-in: the pack is CC BY-NC-SA 3.0 (non-commercial). For personal prompt-matrix work, though, this is the node that makes the whole "generate everything" workflow actually pleasant to look at.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| filename_prefix | STRING | gallery | — |
| image_export_format | COMBO | .webp lossy 90 | 4 options: .webp lossy 80, .webp lossy 90, .webp lossless, .png lossless |
| embed_all_images_in_html | BOOLEAN | true | — |
| images | IMAGE | — | |
| prompts | STRING | — | |
| combination_ids | PROMPTCOMBINATORIDS | — |
Outputs (0)
No outputs