LayerUtility: SimpleTextImage
SimpleTextImage — render text straight onto an image, no editor needed
- size_as
- image
- mask
This is the quick way to get words onto a canvas without leaving ComfyUI: type text, pick a font and size, and out comes an image (plus a matching mask) you can composite onto anything else in your graph. Watermarks, caption plates, labeled batch outputs, placeholder title cards for a video project - anywhere you'd otherwise open Photoshop just to slap text on something, this node does it inline.
How it works
You give it text, a font_file, and a canvas size (width / height, or feed size_as an existing image to match its dimensions instead of typing numbers). The text wraps automatically based on char_per_line, with leading controlling the gap between wrapped lines, and align deciding whether each line sits left, right, or centered. font_size, text_color, and an optional stroke_width/stroke_color outline handle the look; x_offset/y_offset nudge the whole block around within the canvas if it isn't sitting where you want by default.
The font_file dropdown pulls from the pack's own bundled fonts folder - out of the box it ships with a Chinese font (the author is based in China, and it shows). Drop your own .ttf/.otf files into that folder and restart to get them showing up as options; the README documents support for pointing at extra font directories if you'd rather not touch the pack's own folder directly.
The inputs and outputs that matter
text- what gets rendered, multiline.font_file,font_size,align- the basics most people actually touch.text_color/stroke_color+stroke_width- fill color and an optional outline, useful for keeping text legible over a busy background.width/height(or the optionalsize_asinput to match another image instead) - canvas dimensions.
Outputs: image (the rendered text on its canvas) and mask (so you can composite it onto another layer through a mask-based blend instead of baking a solid background color into the result).
How to install it
Ships with LayerStyle. ComfyUI Manager: search ComfyUI Layer Style, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle
pip install -r ComfyUI_LayerStyle/requirements.txt
Restart, find it under 😺dzNodes → LayerUtility. No model downloads for this one - it's font rendering, not AI.
Common issues
If your font_file dropdown only shows one option, that's expected - the pack ships with a single default font, and you need to add your own .ttf/.otf files to its fonts folder (then restart ComfyUI) to see more choices. If non-Latin characters show up as empty boxes, that's a font-coverage issue, not a bug: the font you picked simply doesn't include glyphs for that script, so swap to one that does.
The broader, pack-wide issue is the same one that hits every LayerStyle node: if SimpleTextImage is missing from your node menu entirely, the whole pack failed to import, usually from a transformers/tensorflow version conflict dragged in by another custom node pack sharing your environment - especially common on installs from before LayerStyle split into the base pack and the heavier LayerStyle Advance repo. Reinstall clean, or use Manager's "Try Fix" and actually read the traceback before assuming this specific node is broken.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | text | — |
| font_file | COMBO | 1 options: Alibaba-PuHuiTi-Heavy.ttf | |
| align | COMBO | 3 options: center, left, right | |
| char_per_line | INT | 801–8096 | — |
| leading | INT | 80–8096 | — |
| font_size | INT | 721–2500 | — |
| text_color | STRING | #FFFFFF | — |
| stroke_width | INT | 00–8096 | — |
| stroke_color | STRING | #FF8000 | — |
| x_offset | INT | 00–8096 | — |
| y_offset | INT | 00–8096 | — |
| width | INT | 5121–8096 | — |
| height | INT | 5121–8096 | — |
| size_asopt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |