Text Overlay Node v04
Watermarks, captions and neon text, without leaving the graph
- reference_image
- image
- preview
Every serious ComfyUI setup eventually needs to slap text on an image - a watermark before you post, a caption under a test grid, a title card for a video, or a timestamp on a batch. The usual answer is to drop out to Photoshop or PIL for every single one, which gets old fast. Text Overlay Node v04 exists so the text stays in the graph.
It's a PIL-based text renderer that can either draw on top of a reference image or generate a text-on-background image from scratch. It supports full font selection from your system's installed fonts, bold/italic, drop shadows, outlines, and four flashy effects - gradient, metal, neon and emboss - plus standard blend modes if you want the text to interact with the layer beneath.
How it works
The node renders text with PIL's ImageDraw/ImageFont stack. If you connect reference_image, it uses that as the canvas; leave it disconnected and it creates a blank canvas at width × height. Then it runs the text through line wrapping (wrap_width, or auto-wrap based on the canvas), positions it with x_offset_pct/y_offset_pct plus align and v_align, and applies whatever effects, shadow, outline and blend mode you've asked for.
The fun bit: it parses Markdown (via the markdown library plus BeautifulSoup), so a line like **bold** or *italic* actually renders bold or italic instead of showing asterisks. Feed it a text file via text_file and it'll style a whole caption document. That's a surprisingly useful trick for recipe cards and metadata overlays.
The inputs that matter
For a beginner, you mostly touch these:
text- what gets drawn.text_file(optional) loads from a file instead.font- dropdown of your installed system fonts (it scans the OS font directory), withfont_size,bold,italic.color+background_color/background_opacity- text color and the canvas/backing color.transparent_backgroundon gives you a transparent PNG for stamping.align/v_alignand the*_offset_pctfields - where the text sits.text_effect-nonedefault;gradient,metal,neon,embossare the party tricks. Try neon once, then go back to normal.
There are preview knobs too - show_font_preview, preview_text, fonts_per_page, preview_page - which dump a browsable gallery of fonts to the preview output. Handy when you can't remember which of your 400 fonts is the one you actually like.
Outputs
image- the finished composite.preview- the font gallery image when preview mode is on.
Installing it
It's part of the AAA Metadata System pack:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/AAA_Metadata_System.git
cd AAA_Metadata_System
pip install -r requirements.txt
Restart ComfyUI, or grab "AAA Metadata System" via ComfyUI Manager. The markdown and beautifulsoup4 dependencies it needs are in the pack's requirements, so a normal install covers it. License note: CC BY-NC for non-commercial; commercial use needs a paid license from the author.
Common issues
- Font shows as a tiny default - the font dropdown lists names derived from filenames; if your font isn't found it falls back to defaults like Arial. Check that the font is actually in your OS font directory.
- Text renders literally like
**bold**- you're seeing a Markdown parse failure. Make sure you're not feeding it a file with malformed markup; the parser is permissive but not psychic. - Preview looks huge/empty -
preview_pageandfonts_per_pagecontrol the gallery; bump the page number if you have hundreds of fonts.
It's not going to replace a real design tool for fancy typography, and the font management is a little clunky. But for watermarking and captioning inside a workflow, it's more capable than you'd expect from a node you found in a metadata pack - and it saves you a lot of tabbing out.
Inputs (32)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Your text here | — |
| width | INT | 51216–8192 | — |
| height | INT | 51216–8192 | — |
| font | COMBO | C059 BdIta | 45 options: C059 BdIta, C059 Bold, C059 Italic, C059 Roman, D050000L, DejaVuSans, +39 |
| font_size | INT | 328–256 | — |
| color | STRING | #FFFFFF | — |
| align | COMBO | center | 3 options: left, center, right |
| v_align | COMBO | middle | 3 options: top, middle, bottom |
| transparent_background | BOOLEAN | true | Use a transparent background (if false, uses background color) |
| background_color | STRING | #000000 | Background color when not using transparent background |
| background_opacity | INT | 1000–100 | Background opacity percentage (0-100%) |
| x_offset_pct | FLOAT | 0.0-100–100 | Horizontal offset as percentage of image width (-100% to 100%) |
| y_offset_pct | FLOAT | 0.0-100–100 | Vertical offset as percentage of image height (-100% to 100%) |
| line_spacing | FLOAT | 1.20.5–3 | — |
| padding | INT | 200–500 | — |
| wrap_width | INT | 00–8192 | Max characters per line (0 = auto based on width) |
| reference_imageopt | IMAGE | Optional image to get dimensions from | |
| outline_coloropt | STRING | — | |
| outline_widthopt | INT | 11–10 | — |
| text_fileopt | STRING | — | |
| boldopt | BOOLEAN | false | — |
| italicopt | BOOLEAN | false | — |
| shadowopt | BOOLEAN | false | — |
| shadow_coloropt | STRING | #000000 | — |
| shadow_offsetopt | INT | 21–10 | — |
| layer_blend_modeopt | COMBO | normal | How the text layer should blend with background when composited |
| text_effectopt | COMBO | none | Special effect to apply to text |
| gradient_coloropt | STRING | #0000FF | — |
| show_font_previewopt | BOOLEAN | false | Generate a preview image showing all available fonts |
| preview_textopt | STRING | The quick brown fox jumps over the lazy dog | Sample text to use for font preview |
| fonts_per_pageopt | INT | 305–100 | Number of fonts to show per page in font preview |
| preview_pageopt | INT | 1 | Current page to show in font preview |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| preview | IMAGE | — |