Nodes/NH-Nodes/Image Label (NH)
ComfyUI Node

Image Label (NH)

Stamp a header or footer caption onto a batch of images

By jetthuangai·Created 5 months ago·Updated 21 days ago· 6
Image Label (NH)
  • image
  • image
label_textNH Label
position
frame_height80
fill_enabledtrue
frame_color_hex#111111
text_color_hex#FFFFFF
font_name
font_size32
fit_texttrue
overlay_on_imagefalse
align
padding_x20
outline_width0
outline_color_hex#000000

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_info string.
  • position - header (band on top) or bottom.
  • 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_width 1–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.

CategoryNH-Nodes/Image

Inputs (15)

NameTypeDefaultDescription
imageIMAGE
label_textSTRINGNH Label
positionCOMBO2 options: header, bottom
frame_heightINT801–4096
fill_enabledBOOLEANtrue
frame_color_hexSTRING#111111
text_color_hexSTRING#FFFFFF
font_nameCOMBO1 options: default
font_sizeINT326–512
fit_textBOOLEANtrue
overlay_on_imageBOOLEANfalse
alignCOMBO3 options: left, center, right
padding_xINT200–2048
outline_widthINT00–32
outline_color_hexSTRING#000000

Outputs (1)

NameTypeDescription
imageIMAGE