Text Overlay (Legacy)
Burn text onto images without leaving ComfyUI
- image
- image
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.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| text | STRING | Hello World | — |
| font_size | INT | 321–1024 | — |
| text_color | STRING | FFFFFF | — |
| bg_color | STRING | 000000 | — |
| draw_background | BOOLEAN | true | — |
| bg_padding | INT | 100–1024 | — |
| bg_transparency | FLOAT | 0.500–1 | 0.0 is fully transparent, 1.0 is fully opaque |
| use_percentage | BOOLEAN | false | If True, top/bottom/left/right are treated as percentages (0-100) of the image size. |
| top | INT | -1-1–8192 | -1 for center vertically or use bottom offset |
| bottom | INT | -1-1–8192 | -1 for center vertically or use top offset |
| left | INT | -1-1–8192 | -1 for center horizontally or use right offset |
| right | INT | -1-1–8192 | -1 for center horizontally or use left offset |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |