Add Font Text-Vextra
Burn text into your generation before it ever leaves ComfyUI
- images
- IMAGE
The Add Text To Image node (displayed as "Add Font Text-Vextra") stamps text onto your image before it leaves the graph - the kind of thing you'd otherwise do in a second pass in an image editor. Watermarking a batch for preview sharing, captioning generations, or adding a subtle credit line: that's this node's whole job, and it's good at it.
It's one of the pack's "Vextra" ports - rescued from diontimmer's ComfyUI-Vextra-Nodes after the original developed import errors - and it's also the one node in this pack that's been genuinely extended: the original required you to hunt down a font path, so the port added per-OS default fonts. On Windows it defaults to C:/Windows/Fonts/arial.ttf, on macOS to the system San Francisco font, and on Linux to DejaVu Sans. So it usually works out of the box, which is more than the original could say.
How it works
Plain PIL drawing. The text is rendered onto the image with ImageDraw, using the font file from font_ttf at the given size, positioned at x/y. The anchor choice of "Center" centers the text on that point instead of using it as the bottom-left corner. Rotation is handled by drawing the text on a transparent layer, rotating that, and pasting it back - so rotated text works, it just costs a bit of compositing. color accepts either a hex string (#ff0000) or an rgba(...) string, and color_mode controls whether the output comes back as RGB or RGBA.
One technical note: the drawing code uses PIL's legacy textsize helper, which newer Pillow versions deprecate. It still works, but on a very new Pillow you may see a deprecation warning in the console. Harmless, just noise.
Inputs and outputs
- images (IMAGE, required) - the image or batch.
- font_ttf (STRING) - path to a
.ttf; defaults to your OS's font as above. - size (INT, default 50), x / y (INT, default 50) - text size and position.
- text (STRING, multiline, default "Hello World") - what gets drawn.
- color (STRING, default
rgba(255, 255, 255, 255)) - white by default. - anchor (enum: "Bottom Left Corner" / "Center").
- rotate (FLOAT, default 0, range 0–360) - text rotation in degrees.
- color_mode (enum: "RGB" / "RGBA").
- Output: IMAGE.
Installing it
Standard for the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/aegis72/aegisflow_utility_nodes
Restart ComfyUI, or install "AegisFlow Utility Nodes" via ComfyUI Manager. No models. If you want a font other than the OS default, point font_ttf at any .ttf on disk.
Where people get burned
Custom fonts are the usual stumbling block - the default is fine, but if you point font_ttf at a missing path, the node errors at execution, so verify the path before wiring it in. Also remember text is burned in: there's no editable text layer, so if you change your mind you regenerate or re-edit the original. For watermarking, keep x/y and size modest and pick a color that survives the image's own tones; white text at 50px on a bright render will vanish.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| font_ttfopt | STRING | /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf | — |
| sizeopt | INT | 502–1000 | — |
| xopt | INT | 502–10000 | — |
| yopt | INT | 502–10000 | — |
| textopt | STRING | Hello World | — |
| coloropt | STRING | rgba(255, 255, 255, 255) | — |
| anchoropt | COMBO | 2 options: Bottom Left Corner, Center | |
| rotateopt | FLOAT | 0.00–360 | — |
| color_modeopt | COMBO | 2 options: RGB, RGBA |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |