Nodes/ComfyUI-UtilsCollection/Text Overlay (Legacy)
ComfyUI Node

Text Overlay (Legacy)

Burn text onto images without leaving ComfyUI

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
Text Overlay (Legacy)
  • image
  • image
textHello World
font_size32
text_colorFFFFFF
bg_color000000
draw_backgroundtrue
bg_padding10
bg_transparency0.50
use_percentagefalse
top-1
bottom-1
left-1
right-1

Sometimes the "image post-processing" you need is just words on a picture - a label, a timestamp, a "this is a draft" watermark before you send a render to a client. Doing that in an external editor is a tab-switch you don't need, because this pack ships a node for it. TextOverlayNode ("Text Overlay (Legacy)") takes an image and a text string and returns the same image with the text drawn on it, with full control over font size, colors, background box, transparency, and position.

It's the (Legacy)-tagged alias of the pack's canonical UC_TextOverlayNode; same behavior, and it's about as simple as a ComfyUI node gets. One image in, one image out, nothing else.

What it does

Inputs are image, text (multiline, default "Hello World"), and a batch of styling knobs:

  • font_size - 1 to 1024, default 32.
  • text_color / bg_color - hex strings, default white text on black.
  • draw_background - whether to draw the box behind the text at all.
  • bg_padding - padding around the text inside that box (default 10).
  • bg_transparency - 0.0 fully transparent to 1.0 fully opaque (default 0.5). This is the knob that makes the overlay feel like a caption rather than a sticker.

Positioning is where it gets slightly clever. top, bottom, left, right are all offsets, and -1 means "center on that axis." So with everything at -1 the text lands dead-center, and you nudge it with one edge instead of computing pixel math. Flip use_percentage on and the four edges are treated as percentages (0–100) of the image size instead of raw pixels - handy when you're overlaying images of wildly different dimensions and want text at "10% from the top" every time.

Under the hood it's PIL: it draws onto a transparent RGBA overlay (so the background box can be semi-transparent without haloing the original), then composites over the image. It handles a batch of images too - connect a batched list and every frame gets the same overlay, which makes it quietly useful for labeling video frame sequences. Font handling falls back gracefully: it tries Arial, then DejaVu Sans on Linux, then PIL's default, so it won't crash on a headless box that lacks fonts - though if you want nice type, you may find yourself installing a font file anyway.

Install

Via ComfyUI Manager (search ComfyUI-UtilsCollection) or:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Restart. Deps: opencv-python and typing-extensions (PIL ships with ComfyUI's environment).

When you'd reach for it

Labeling batches, watermarking before sharing, adding a "workflow revision 3" caption to a comparison grid, or stamping timestamps onto video frames inside a larger pipeline. It's not a typography tool - don't expect kerning control or outlined text - but for "burn this string onto this image and continue the graph," it's exactly the node you want.

Categoryadvanced/image

Inputs (13)

NameTypeDefaultDescription
imageIMAGE
textSTRINGHello World
font_sizeINT321–1024
text_colorSTRINGFFFFFF
bg_colorSTRING000000
draw_backgroundBOOLEANtrue
bg_paddingINT100–1024
bg_transparencyFLOAT0.500–10.0 is fully transparent, 1.0 is fully opaque
use_percentageBOOLEANfalseIf True, top/bottom/left/right are treated as percentages (0-100) of the image size.
topINT-1-1–8192-1 for center vertically or use bottom offset
bottomINT-1-1–8192-1 for center vertically or use top offset
leftINT-1-1–8192-1 for center horizontally or use right offset
rightINT-1-1–8192-1 for center horizontally or use left offset

Outputs (1)

NameTypeDescription
imageIMAGE