Nodes/ComfyUI Assistant Node/PVL Text Overlay
ComfyUI Node

PVL Text Overlay

Stamp words on your images without leaving ComfyUI

By pvlprk·Created about a year ago·Updated 8 months ago· 1
PVL Text Overlay
  • image
  • IMAGE
textHello, ComfyUI!
fontC059
font_variationauto
font_size51
font_color_r255
font_color_g255
font_color_b255
x_percent50.0
y_percent50.0
anchorcenter-center

You generate a great image, then you need words on it: a watermark, a caption, the prompt stamped in the corner for sharing, a label on a comparison grid. That's a 30-second trip to an image editor - or a single node that does it inside the graph so it happens on every render automatically. PVL_Text_Overlay is that node. It takes an image, draws your text onto it with Pillow, and hands you the result back as an IMAGE, batch and all.

How it works

The interesting machinery is the fonts. On startup the node scans your system's installed fonts through matplotlib's font manager and builds the dropdown you see in font - that's where the ~34 entries come from. It also looks in a fonts/ folder next to the pack's own files: drop any .ttf or .otf in there and it shows up as a font family too. C059, the default, is one of the URW fonts that matplotlib bundles, so it works even on machines with no extra fonts installed.

Drawing itself is plain Pillow: it converts the tensor to a PIL image, sizes the text with font_size (pixels, default 51), picks font_variation - auto grabs whatever's available, or you can force regular/italic/bold/bold_italic - and renders with the font_color_r/g/b RGB values (all 0–255). It loops over every image in the batch with a progress bar, so a grid of 16 images gets all 16 stamped in one pass.

The inputs that matter

Three things you'll actually touch beyond the obvious image and text:

  • x_percent / y_percent - position as a percentage of the image dimensions (0–100), not pixels. This is the quietly great part: resize the image or change the resolution and the text stays put proportionally.
  • anchor - the nine-point reference, default center-center. This tells the node which part of the text sits at the x/y point. With center-center, x/y is the middle of the text; switch to left-top and that same x/y becomes the text's top-left corner.
  • font_variation - auto is fine until you need actual bold or italic; some fonts only ship one weight, and the node falls back to whatever's closest.

Output is a single IMAGE, same size as the input, ready to feed a VAE decoder, a save node, or another overlay.

Where people get burned

First, fonts are scanned at startup. Install a new system font or drop one in the fonts/ folder and you have to restart ComfyUI for it to appear in the dropdown - it won't show up live.

Second, remember x/y position the anchor, not the top-left of the text. Set center-center and 50/50 and the text is centered; keep the default anchor but expect it to behave like a center handle.

Third - and this is the real limitation - there's no outline or background option. It's solid colored text straight onto the image. On a busy background white text vanishes. Either pick a flat region, choose a color that contrasts, or run it before whatever effect you'd otherwise use to darken the area. It's a watermark node, not a caption-with-badge node.

One quirk of the pack to know about: the dependencies. The pack ships with matplotlib, diffusers, fal-client, google-genai and friends in requirements.txt, all pulled in for the other nodes in the pack - text overlay itself just needs Pillow, torch, numpy and matplotlib (which does the font scanning). Installing the pack drags in the whole list.

Install

This lives in pvlprk/comfyui-pvl-api-nodes, listed in ComfyUI Manager as ComfyUI Assistant Node - a pack title that describes only the OpenAI-assistant node, not the eighty-odd API wrappers and utilities actually in the repo. Clone it if you're not on Manager:

cd ComfyUI/custom_nodes
git clone https://github.com/pvlprk/comfyui-pvl-api-nodes

Restart, and you'll find it under ⚙️PVL Nodes → Text. No model downloads, no API keys. It's a single-author personal pack with no support community to speak of, but the drawing logic is short and readable if you ever need to dig in. For quick watermarking and captions inside the graph, it does the job with less friction than exporting and editing.

Category⚙️PVL Nodes/Text

Inputs (11)

NameTypeDefaultDescription
imageIMAGE
textSTRINGHello, ComfyUI!
fontCOMBOC059Font family.
font_variationCOMBOauto5 options: auto, regular, italic, bold, bold_italic
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