Nodes/ComfyUI_Fill-Nodes/FL Text Overlay
ComfyUI Node

FL Text Overlay

Burn text onto an image, positioned by percentage

By filliptm·Created 3 years ago·Updated about 15 hours ago· 628
FL Text Overlay
  • image
  • IMAGE
textHello, ComfyUI!
fontBarcode
font_size51
font_color_r255
font_color_g255
font_color_b255
x_percent50.0
y_percent50.0
anchorcenter-center

Sometimes you just need to slap text on an image inside the graph - a watermark, a label on a batch of variations, a caption bar, a quick meme. FL_TextOverlayNode does exactly that and nothing more. It takes an IMAGE, draws your text on it with PIL, and hands back the IMAGE. No fuss, no dependencies you don't already have, no model. It's one of those small utility nodes you don't think about until you need it, and then you're glad it's there.

How it works

Under the hood it's PIL.ImageDraw painting onto your tensor. You give it the string, a font, a size, an RGB color, and a position, and it renders. The one design choice worth understanding is that positioning is percentage-based, not pixel-based: x_percent and y_percent place the text at a fraction of the image's width and height. That means the same node settings land in the same relative spot whether you're working at 512px or 1536px, which is genuinely nice when you're batching mixed sizes. Pair that with the anchor and you've got proper control.

Text is multiline - newlines in the text field render as actual line breaks, so a two-line caption Just Works.

The inputs that matter

  • text - the string to draw. Multiline, so paste in whatever.
  • x_percent / y_percent - where it goes, as a 0–100 percentage of the image. 50/50 is dead center.
  • anchor - which part of the text block lands on that point. Nine options, from left-top through center-center to right-bottom. This is the setting people forget, and it's the difference between text that's centered and text that runs off the edge. Want a bottom-centered caption? y_percent near 90, anchor center-bottom.
  • font_size and font_color_r/g/b - size in points, color as three 0–255 channels. Default is white at size 51.
  • font - a dropdown of what the pack bundles plus system fonts: Barcode, Circles, Fancy, Pattern, and arial. The first four are decorative display fonts that ship with Fill-Nodes; arial is the plain, readable one you'll usually want.

Output is a single IMAGE with the text baked in. Wire it wherever the original image was going.

Installing it

Part of the Fill-Nodes pack. Via ComfyUI Manager: search ComfyUI_Fill-Nodes, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes

and restart. The pack drops a big "Machine Delusions" banner in your console on startup - that's just the author's splash screen, not an error and not anything to worry about.

Where people get tripped up

  • The font list is short on purpose. You get the four bundled fonts plus arial. If you were expecting your whole system font library, that's not how this node works - it exposes a curated list. Pick arial for anything you actually need to read.
  • It draws text directly on pixels - there's no background box. If your text disappears into a busy image, that's expected; the node doesn't add a contrasting bar behind it. If you want a solid caption strip, the pack's FL_ImageNotes does that instead - this node is the transparent-overlay tool.
  • Anchor + percentage is the mental model. If your text is clipping off an edge, you almost certainly have the anchor fighting the position. Set the anchor to the corner nearest where you're placing it and it snaps into line.
  • The decorative fonts are decorative. Barcode and Pattern look cool and are illegible at small sizes. That's a feature, not a bug - just don't use them for real captions.
Category🏵️Fill Nodes/VFX

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
textSTRINGHello, ComfyUI!
fontCOMBOBarcode5 options: Barcode, Circles, Fancy, Pattern, arial
font_sizeINT51
font_color_rINT2550–255
font_color_gINT2550–255
font_color_bINT2550–255
x_percentFLOAT50.00–100
y_percentFLOAT50.00–100
anchorCOMBOcenter-center9 options: left-top, center-top, right-top, left-center, center-center, right-center, +3

Outputs (1)

NameTypeDescription
IMAGEIMAGE