Image Array
Turn a pile of images into a labeled comparison grid
- images
- array
- images
Image Array is the flagship of this pack and probably why you're here. You feed it a batch of images and it returns a single, neatly labeled grid - a contact sheet, a comparison panel, whatever you want to call it - ready to drop into a Reddit post or a Discord channel. The community has a whole genre of posts that boil down to "look, I labeled it properly," and this is the node that gets you there without leaving ComfyUI.
The pipeline is equalize → label → arrange. It makes all the images a uniform size, stamps labels under (or over, or beside) each one, and lays them out in a grid you control. That "make it presentable" step is exactly what r/StableDiffusion's comparison posts are begging for, and it's the whole point of this pack.
How it works
Three stages under one hood. First your images are equalized (the same logic as the Image Equalizer node) so they fit together. Then each cell gets a label. Finally the layout engine picks rows and columns from your shape choice:
horizontal/vertical- one row, one column.square- the N×M grid closest to square that minimizes empty cells.smart_square/smart_landscape/smart_portrait- pick the grid whose cell aspect ratio best fits 1:1, 3:2, or 2:3. This is the one you want for mixed portrait/landscape photo galleries, because a grid sized for the wrong aspect leaves ugly blank strips.
background (white or black) decides the canvas color and the label scheme - the opposite color becomes the label background, so you always get readable contrast. spacing puts a pixel border around each cell (5–10 reads much cleaner than 0).
The inputs that matter
images- your batch. It's a list-aware node, so a Python list of tensors works too.labels- multiline text, one label per line. This is where people get burned: pressing Enter makes a new label, so to get a line break inside one label you type a literal\n. Semicolons split labels too, and numbers get auto-formatted (decimals truncated to 5 places, trailing zeros dropped).label_input- optional dynamic input. Connect a string, number, or list from another node and it overrides thelabelswidget. Handy when labels are themselves generated, like prompt text or a seed counter.label_end-looprepeats your label list if you have more images than labels;endjust stops labeling.resize/size_method/pad- the equalizer stage.pad(default) letterboxes to a uniform size;stretchdistorts;crop_centerfills by cropping.resize: growupscales small images rather than shrinking big ones.
Two outputs: array (the single combined grid image) and images (a list of the individually labeled images, if you want them separately).
Install
ComfyUI Manager → search "Img Label Tools" → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/rjgoif/ComfyUI-Img-Label-Tools
Restart ComfyUI after either. No models, no heavy deps - Pillow and PyTorch are already there. For custom fonts, drop a .ttf into a fonts folder at your ComfyUI root and it'll show up in the font dropdown; otherwise it falls back to Arial.
Gotchas
The \n-vs-Enter label thing is the #1 confusion, so read the labels section twice. Also, the equalizer is CPU-bound and grow mode scales to the largest image in the batch - one oversized input makes the whole grid balloon, so normalize your inputs first if memory complains.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| background | COMBO | white | 2 options: white, black |
| resize | COMBO | grow | 2 options: grow, shrink |
| size_method | COMBO | pad | 4 options: pad, stretch, crop_center, fill |
| pad | BOOLEAN | true | — |
| shape | COMBO | horizontal | 6 options: horizontal, vertical, square, smart_square, smart_landscape, smart_portrait |
| labels | STRING | — | |
| label_end | COMBO | loop | 2 options: loop, end |
| label_location | COMBO | bottom | 6 options: top, bottom, left_vert, left_hor, right_vert, right_hor |
| label_size | INT | 320–200 | — |
| font | COMBO | arial.ttf | 1 options: arial.ttf |
| spacing | INT | 50–100 | — |
| label_inputopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| array | IMAGE | — |
| images | IMAGE | — |