文字图像🐠meeeyo.com
Turn text into an image — with working Chinese font support out of the box
- any
- IMAGE
No, this isn't text-to-image diffusion - no model involved. TextToImage is the old-school kind: it renders your text with a font onto an image using Pillow, and hands you a ready-to-use IMAGE tensor. The reason it's worth knowing about over the dozen other "text overlay" nodes is the font situation: the pack ships two Chinese fonts (SimHei and KaiTi) in its repo, so CJK text actually renders correctly, which most generic text nodes quietly mangle.
The Chinese display name is 文字图像 ("text image"). It's part of ComfyUI_StringOps, a pack that was clearly built for Chinese-speaking users - this node is one of the best proofs of that, and also one of the most self-contained features in it.
How it works
Six inputs:
- text - multiline; each line becomes a row.
- font - the font drop-down, populated from the pack's
fonts/folder:simhei.ttf(bold-ish sans) andsimkai.ttf(brush-style kai). This is the node's killer feature - the fonts ride along in the install, no system font hunting. - max_width - the target width in pixels (default 300). The node measures your text, then scales the font size so the longest line fits - so you control the box, not the point size.
- font_properties - comma string
#FFFFFF,1,1,C,1= color, letter-spacing factor, line-spacing factor, alignment (C/L/R), opacity. - font_stroke -
#000000,2,1= outline color, width, opacity. - font_background -
#333333,5,10,1= background color, padding, corner radius, opacity.
Output is a single IMAGE you can wire into anything that takes an image - a preview, a composition, or straight into a save node.
Where you'd use it
Watermarking and labeling are the obvious jobs - a filename stamp, a batch number, a title card - especially when your text is Chinese and every other node shows tofu boxes. It's also useful for turning prompt fragments into reference images for layouts, or for "text card" assets you then composite with the pack's ImageOverlayAlignment node. Because the text is rendered at the size that fits max_width, it's forgiving: you type, it fits.
The traps
The comma-string parameters are where people stumble. Each field is value,value,value with a specific order - swap two and you get a wrong color or a font that suddenly ignores alignment. The alignment codes are single letters (C, L, R). And there's no "transparent background" toggle: font_background alpha is a factor, so to go transparent you'd set it toward 0 and rely on RGBA - actually, be aware the node renders in RGBA, so you can composite with alpha downstream. One real quirk: if the font file fails to load (missing from fonts/), the node returns None - a silent empty output, not an error - so don't delete the fonts folder.
Installing it
Pack standard: ComfyUI Manager → ComfyUI_StringOps, or
cd ComfyUI/custom_nodes
git clone https://github.com/MeeeyoAI/ComfyUI_StringOps.git
Restart. The fonts install as part of the repo - nothing to download separately. Dependencies (Pillow, numpy) are already in ComfyUI.
The honest take
For English-only text you can find prettier options in bigger packs. For Chinese text in a ComfyUI workflow, this is genuinely one of the few nodes that works without you installing a system font, and that alone justifies grabbing the pack. The comma-string styling is fiddly, but the default values are sensible enough to get a usable label on the first run. If your pipeline labels images in Chinese, this is the one.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Hello, World! | — |
| font | COMBO | 2 options: simhei.ttf, simkai.ttf | |
| max_width | INT | 3001–2048 | — |
| font_properties | STRING | #FFFFFF,1,1,C,1 | — |
| font_stroke | STRING | #000000,2,1 | — |
| font_background | STRING | #333333,5,10,1 | — |
| anyopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |