Add Text Overlay
Burn a caption bar onto any image
- image
- image
This one does exactly what the name says: it stamps a text bar onto an image. Simple, but the use case is genuinely handy - labeling comparison grids, burning the seed or prompt onto a save file so you know what produced it six months from now, or captioning a batch of outputs before you dump them into a folder. Pair it with this pack's iTools KSampler, whose INFO output is exactly the kind of settings string you'd want to overlay onto the image it produced.
How it works
You feed it an image and a text string, and it draws a bar with your text onto the image. Two things control the look: background_color, a hex string, and font_size. There's also a toggle, overlay_mode, that controls whether the bar sits over the image (covering part of the picture) or extends the canvas so the text sits below the picture without covering any of it - the README's own changelog note describes this as being able to "add the text over or under the image," which lines up with what the boolean does.
The background_color field defaults to #000000AA - an 8-digit hex code, not the usual 6. The extra two digits are the alpha channel: AA is roughly 67% opacity, so the default bar is a translucent black strip rather than solid. If you want a fully opaque bar, use #000000FF; for something more see-through, drop the last two digits toward 00.
The inputs and outputs that matter
image- the picture you're captioning.text- what gets drawn (default is the placeholder"img info:"- replace it).background_color- hex, alpha-aware, default#000000AA.font_size- 10 to 1000, default 40. Scale this to your image resolution; 40px reads fine on a 512-1024px image but disappears on a 4K canvas.overlay_mode- boolean, default on (bar drawn over the image).
Output is a single image, ready to feed into a Save Image node or chain into another iTools node like Grid Filler for a labeled contact sheet.
Installing it
Via ComfyUI Manager: search "iTools" or "ComfyUI-iTools," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/MohammadAboulEla/ComfyUI-iTools
then restart. Nothing heavier than standard Python imaging is implied by what this node does, and the README doesn't flag any special dependency for it - a normal install should be enough.
Troubleshooting
Text is unreadable against the image. The default background is only ~67% opaque, so a busy or light-colored image can still show through and clash with your text color. Push background_color's alpha toward FF for a solid bar, or pick a darker/lighter hex depending on your image content.
Font size looks tiny or absurdly huge. font_size is in pixels and there's no auto-scaling to image dimensions - a value tuned for a 1024px square will look wrong on a 512px thumbnail or a 4K render. Adjust per output size rather than reusing one number across very different resolutions.
Bar is covering the part of the image you actually care about. Toggle overlay_mode off - per the README's own description of the feature, this switches the node from drawing over the image to adding the text as its own strip, which extends the canvas instead of covering picture content.
You want the bar to say something dynamic, like the seed or sampler settings used, rather than a fixed caption. Wire text from a string-producing node instead of typing a literal - this pack's KSampler INFO output or Prompt Styler's used_template output both work as live sources.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| text | STRING | img info: | — |
| background_color | STRING | #000000AA | — |
| font_size | INT | 4010–1000 | — |
| overlay_mode | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |