FL Text Overlay
Burn text onto an image, positioned by percentage
- image
- IMAGE
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/50is dead center.anchor- which part of the text block lands on that point. Nine options, fromleft-topthroughcenter-centertoright-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_percentnear 90,anchorcenter-bottom.font_sizeandfont_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, andarial. The first four are decorative display fonts that ship with Fill-Nodes;arialis 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. Pickarialfor 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_ImageNotesdoes 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.
BarcodeandPatternlook cool and are illegible at small sizes. That's a feature, not a bug - just don't use them for real captions.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| text | STRING | Hello, ComfyUI! | — |
| font | COMBO | Barcode | 5 options: Barcode, Circles, Fancy, Pattern, arial |
| font_size | INT | 51 | — |
| font_color_r | INT | 2550–255 | — |
| font_color_g | INT | 2550–255 | — |
| font_color_b | INT | 2550–255 | — |
| x_percent | FLOAT | 50.00–100 | — |
| y_percent | FLOAT | 50.00–100 | — |
| anchor | COMBO | center-center | 9 options: left-top, center-top, right-top, left-center, center-center, right-center, +3 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |