Image Label (NH)
Stamp a header or footer caption onto a batch of images
- image
- image
When you generate twenty variations and need to know which prompt made which one, the answer is usually "write it on the image." Image Label (NH) is the caption stamp: it adds a header or footer band to every image in a batch, with your text, styled the way you want. The classic use is ending a workflow with the prompt, seed, or model name burned into the output - so the image carries its own provenance even after it's shared, renamed, and cropped.
How it works
The inputs split into three groups, and the defaults are actually sensible:
The label itself
- label_text - multi-line; anything goes. Feed it a prompt, a filename from Load Clip Index (NH), or a
grid_infostring. - position -
header(band on top) orbottom. - align - left, center, or right within the band.
- fit_text (default on) - automatically shrinks the font until the text fits the width. This is the setting that saves you from "my caption overflows the frame" fiddling. Turn it off only if you want an explicit cut.
The band
- frame_height - band thickness in pixels (default 80).
- fill_enabled - when on, the band is a solid
frame_color_hex; when off, it's a stretched sample of the image's own edge - a blurred strip pulled from the top or bottom row. That's a nice touch for a caption that looks integrated instead of slapped on. - overlay_on_image - when on, the band is pasted over the image (shrinking to fit if needed) instead of extending the canvas. When off, the output gets taller/wider by
frame_height.
The text rendering
- font_size, font_name (currently just the default font), padding_x, outline_width / outline_color_hex - the usual typography knobs. A thin outline (
outline_width1–2, black) makes white text readable over any background, which matters when the image behind the band is bright.
The single output is image - the labeled batch, ready to save.
The pattern worth building
The real power is wiring dynamic text in. A workflow that ends with Image Label (NH) fed by a filename or index output produces self-documenting outputs with zero extra effort: every image you save already has its seed, model, or prompt written on it. It's the same instinct as the metadata you get in the PNG, but visible without opening anything.
Installing
Part of NH-Nodes, one-time setup:
cd ComfyUI/custom_nodes
git clone https://github.com/jetthuangai/NH-Nodes.git
cd NH-Nodes
pip install -r requirements.txt
Or search NH-Nodes in ComfyUI Manager and restart. No models, no downloads - it's PIL text rendering. If your caption looks tiny, check fit_text first (it shrinks by design), then raise font_size or lower frame_height.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| label_text | STRING | NH Label | — |
| position | COMBO | 2 options: header, bottom | |
| frame_height | INT | 801–4096 | — |
| fill_enabled | BOOLEAN | true | — |
| frame_color_hex | STRING | #111111 | — |
| text_color_hex | STRING | #FFFFFF | — |
| font_name | COMBO | 1 options: default | |
| font_size | INT | 326–512 | — |
| fit_text | BOOLEAN | true | — |
| overlay_on_image | BOOLEAN | false | — |
| align | COMBO | 3 options: left, center, right | |
| padding_x | INT | 200–2048 | — |
| outline_width | INT | 00–32 | — |
| outline_color_hex | STRING | #000000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |