Nodes/ComfyUI-ZImagePowerNodes/⚡| Image Labeler
ComfyUI Node

⚡| Image Labeler

Stamp a text label onto any image — the current version of the pack's labeler

By martin-rizzo·Created 8 months ago·Updated 7 days ago· 357
⚡| Image Labeler
  • image
  • divider1
  • IMAGE
enable_label
text
text_color#FF0000
background_color#FFFFFF
font_nameroboto_slab
font_size64
font_scalenone
label_positionbottom_right
label_padding-1
min_label_width0
min_label_height0

Image Labeler 2 is the current version of the pack's image-annotating utility: it takes an image and a string, renders the string as a label onto the image, and hands the result back. That's the whole job. If you're assembling comparison grids, building datasets, or watermarking test renders with their prompt/seed, this is the node that puts the text on the pixels before you save them.

It's the successor to the pack's original ImageLabeler (now deprecated). The difference is a single enable_label master switch, which is more useful than it sounds: you can keep the label configuration wired up and just toggle whether it applies, without deleting text or resetting 10 settings.

How it works

The label is drawn as a colored text box positioned on the image, with a background so it stays readable over busy renders. The geometry is all controllable: position, padding, font, size, and minimum label dimensions. There's also a font_scale option (none / by_image_width / by_image_height) that auto-scales the text relative to the image size - the right choice if your batch has mixed resolutions, since a fixed pixel size looks enormous on a 512px render and tiny on a 2K one.

The inputs that matter

  • image (IMAGE) - what to label.
  • enable_label (BOOL) - the master switch. Off returns the image untouched.
  • text (STRING) - the label content. Hex colors #RRGGBB for text_color and background_color.
  • font_name (COMBO), font_size (8–256) - the type. Font size is auto-adjusted relative to image height, per the tooltip.
  • label_position (COMBO, default bottom_right) - corner/edge placement.
  • label_padding (INT, default −1) - −1 means automatic padding based on font size.
  • min_label_width / min_label_height - floor sizes so a short label or small font still gets a decent box.
  • font_scale - auto-scaling mode as above.

Output: the labeled IMAGE.

Install

Part of the Z-Image Power Nodes pack:

cd ComfyUI/custom_nodes
git clone https://github.com/martin-rizzo/ComfyUI-ZImagePowerNodes

Restart ComfyUI (or ComfyUI Manager → "Z-Image Power Nodes"). No pip dependencies.

When you'll actually use it

The killer combo in this pack is Labeler → Grid Builder: label each render with its style or seed, then assemble them into a comparison sheet, and suddenly your seed/strength/style tests are readable at a glance instead of a mystery. Where people get burned: forgetting that font_size is capped at 256 and auto-scaled to image height - a "256" on a 1024px image is not as huge as you'd think, so if text comes out smaller than expected, check whether font_scale is fighting you. Set it to none if you want literal control. And the label_padding = −1 default looks right in most cases; only touch it when the box feels cramped.

Category⚡Z-Image/utils

Inputs (13)

NameTypeDefaultDescription
imageIMAGEInput image to which the label will be added.
enable_labelBOOLEANWhen enabled, applies the label configuration to the image. If disabled, the image will be displayed without label.
divider1ZIPN_SEPARATOR
textSTRINGText to be displayed in the label.
text_colorSTRING#FF0000Color of the label text in hexadecimal format (e.g. #FFFFFF for white).
background_colorSTRING#FFFFFFBackground color of the label in hexadecimal format (e.g. #000000 for black).
font_nameCOMBOroboto_slabThe font to be used for the label text.
font_sizeINT648–256Size of the font used for the label text, the final size will be adjusted automatically in relation to the image height.
font_scaleCOMBOnonePosition of the label on the image, specifying the corner or edge alignment.
label_positionCOMBObottom_rightPosition of the label on the image, specifying the corner or edge alignment.
label_paddingINT-1-1–100Padding around the label text, measured in pixels. Set this value to -1 for automatic padding adjustment based on font size.
min_label_widthINT0Minimum width of the label area in pixels, ensuring the label has enough width even if the text is so short.
min_label_heightINT0Minimum height of the label area in pixels, ensuring the label has enough height even if the font is so small.

Outputs (1)

NameTypeDescription
IMAGEIMAGEOutput image with the added label containing the specified text.