Image with text label, good for comparison grids
Label your comparison images so you can actually read the grid
- image
- mask
- IMAGE
Every serious comparison grid dies the same way: you tile eight images, close the tab, and three days later you have no idea which row was which sampler. This node is the fix - it takes an image (or a mask, if you want to preview masks in a grid) and stamps a label onto it, which is exactly what you want before you stitch images together into an A/B comparison. The display name even says "good for comparison grids," and it's not kidding: pair it with ComfyUI's core Image Stitch node and you've got a labeled grid pipeline.
How it works
Under the hood it's Pillow doing the work. The node builds a canvas slightly larger than your image, pastes the image on it with a separation border, and draws your text in a label strip on whichever side you pick - top, bottom, left, or right. The text isn't dumb-fitted either: it wraps words to fit the strip and shrinks the font until it all fits, so a long prompt doesn't just get cut off. Vertical labels on the left/right sides render top-to-bottom. If the font name you give it isn't found, it falls back through DejaVu Sans Bold on Linux and the system font on Windows before giving up and using Pillow's default.
Two of the size inputs are cleverer than they look. label_size and separation both accept either a percentage ("10%", relative to the image height for top/bottom, width for left/right) or absolute pixels ("24"). Percentage is the right default - it keeps the label proportionally sized whether your image is 512×512 or 2K.
The inputs that matter
- text - the label; multiline is fine.
- side - where the label goes.
- label_size - strip thickness, as
%or px. - separation - the border around the image, as
%or px. - background_color / foreground_color - border/label background and text color. Named colors, hex, or RGB lists.
- font_name - default Arial.
- image or mask - give it one or the other, not both. The mask path is handy for labeling alpha previews.
Output is a single IMAGE tensor (RGB). It processes whole batches, so a grid of labels stays one node.
Installing it
Part of the Image Misc pack:
cd ComfyUI/custom_nodes
git clone https://github.com/set-soft/ComfyUI-ImageMisc
cd ComfyUI-ImageMisc && pip install -r requirements.txt
or via ComfyUI Manager ("Image Misc"), then restart. It's under image/manipulation.
Notes
The main trap is wiring both image and mask - pick one, leave the other unconnected, and the node errors helpfully if you provide neither. Colors are parsed by the same flexible parser as the rest of the pack, so white or #FFFFFF both work. One honest caveat: it doesn't do fancy rendering - no outline, no shadow, no corner badges. It's a tool for making grids legible, and for that it's exactly right. If you need text burned into the image itself at an arbitrary position, this isn't that; for comparison grids, though, it's the node you'll actually reach for.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Your text here | Label for this image |
| side | COMBO | 4 options: top, bottom, left, right | |
| label_size | STRING | 10% | Expressed as a percentage (i.e. 10%) or absolute number of pixels |
| separation | STRING | 1% | Expressed as a percentage (i.e. 1%) or absolute number of pixels |
| background_color | STRING | white | — |
| foreground_color | STRING | black | — |
| font_name | STRING | Arial | — |
| imageopt | IMAGE | Image, leave unconnected when using a mask | |
| maskopt | MASK | Mask to be used as image, leave unconnected when using an image |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |