Zoey - 文本叠加
Drop readable text on an image inside the node — drag it, size it, rotate it, ship it
- image
- 输出图像
ZoeyTextOverlay is the "put words on this picture" node - but the words actually render inside the node, on the image, where you can drag them around, resize, rotate, recolor, and set opacity before you ever run the graph. If you've ever needed a watermark, a label on a product render, burned-in text on an output image, or a caption plastered across a hero frame, this is the direct route. It saves you the export→Photoshop→re-import dance by making the compositing part of the workflow itself.
It's from comfyui-ZoeyTool (the Zoey Tool/图像处理 family), and it's typical of that pack's interactive streak - a real frontend over a genuinely simple engine. Under the hood it's Pillow drawing text onto an RGBA overlay and alpha-compositing it over your image. The frontend is where the magic lives.
How it works
The node takes an image, a text string, and a text_config JSON object. On its own, with defaults, it drops your text centered on the image at a default size - that's the boring path. The useful path is the interactive one: a canvas editor in the node body lets you position, rotate, and style text, and the frontend writes everything back into text_config (a JSON blob carrying per-text size, x, y, r rotation, o opacity, color, and per-item font). The Python side parses that config and renders accordingly.
A few real details:
- It supports multiple text items in one
text_configarray - several strings, different styles, all composited in one pass. Each item can carry its own font. - Fonts are genuinely handled. There's an
optional font_path, but even with it blank the node runs through a long candidate list of common free-font paths across Windows/macOS/Linux - Microsoft YaHei, Source Han/Noto CJK, MiSans, PingFang, Roboto and more. If a CJK font is present on your system, Chinese text renders properly rather than as tofu boxes. - Text can be rotated per item, and opacity is per-item (it bakes into the fill alpha).
The single output, 输出图像, is your image with text composited - wire it onward to a saver or into your next processing step.
Installing it
Same pack, same story:
cd ComfyUI/custom_nodes
git clone https://github.com/liangzoey/comfyui-ZoeyTool.git
cd comfyui-ZoeyTool
pip install -r requirements.txt
Restart ComfyUI (or ComfyUI Manager → comfyui-ZoeyTool). No models to download. Fonts are the only "dependency," and those come from your OS - if you're rendering CJK text and every character is a rectangle, install a Noto CJK or Source Han font and the auto-discovery will find it.
Where people get burned
The config-JSON split confuses people: the text field is the fallback for when text_config is empty - once the frontend has written a config, editing the plain text box may not change what renders, because the per-item text now lives in the JSON. Edit text in the node's canvas view, not the string widget. Second, the color format is hex (#ffffff); the parser silently falls back to white on garbage, so a mistyped color won't error, it'll just render white and make you wonder. And third, because rendering is Pillow, very large text at extreme sizes on huge canvases can be a touch slow, but for normal overlay work it's instant. The trap to remember overall: this node renders text onto the image as pixels - it's not live-editable after export, so bake your text last, right before the saver.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| text | STRING | Hello | — |
| text_config | STRING | {} | — |
| font_pathopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 输出图像 | IMAGE | — |