Nodes/ComfyUI-Text_Image-Composite [WIP]/Text_Image_Multiline_Zho
ComfyUI Node

Text_Image_Multiline_Zho

Multiline text with actual control over spacing

By ZHO-ZHO-ZHO·Created 3 years ago·Updated 2 years ago· 122
Text_Image_Multiline_Zho
  • color
  • outline_color
  • image
textZHOZHOZHO
selected_font
align
wrap120
graphspace10
linespace2
font_size12
outline_size0
margin_x0
margin_y0
width512
height512
swapfalse

Text_Image_Multiline_Zho is the sibling of Text_Image_Zho for when one line isn't enough. Instead of a single string you get a proper multiline text box, and instead of a fixed line layout you get two extra controls the single-line node doesn't have: linespace (gap between lines) and graphspace (gap between paragraphs). If your workflow renders captions, body text, or anything that reads like a paragraph rather than a title, this is the node you want.

Same pack, same author (ZHO-ZHO-ZHO), same pure-PIL architecture - no models, no keys, no downloads. It's a straight Pillow text-rendering pass: draw the text, wrap it, convert to an IMAGE tensor on a transparent canvas. Where the single-line node is built for headlines and arc text, this one is built for reading.

How it works

The text input is split on newlines into paragraphs, each paragraph is wrapped at wrap characters, and each line is drawn onto the canvas. linespace is added between every line; graphspace is added between paragraphs, which is what makes this usable for anything that resembles body text. Everything else mirrors the family: selected_font (populated by scanning your ComfyUI tree for font files, plus the pack's bundled fonts), align (left/center/right), font_size, color, outline_size/outline_color, margins, canvas width/height, and a swap toggle. Set wrap to 0 and it auto-wraps to about width / font_size characters per line.

The inputs that matter

  • text - multiline string input. The default is, uh, "ZHOZHOZHO". Change it.
  • linespace - extra pixels between lines. Default 2.
  • graphspace - extra pixels between paragraphs. Default 10.
  • wrap - characters per line; 0 = auto.
  • font_size, color, outline_size, outline_color - styling.
  • align, margin_x/margin_y, width/height, swap - layout.

Output is a single IMAGE with a transparent background.

Installing it

The whole pack installs at once:

cd ComfyUI/custom_nodes
git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-Text_Image-Composite

or ComfyUI Manager → search ComfyUI-Text_Image-Composite, restart, and it appears under Zho模块组/text. No requirements.txt, nothing extra to fetch.

Common issues

  • Text runs off the canvas - this node doesn't auto-size the output; it draws at exactly width×height. Long text with a small canvas gets clipped, and nothing warns you. Measure your content or leave generous margins.
  • wrap = 0 is auto-wrap, not no-wrap. That catches people on every node in this family.
  • No arc mode here - if you need curved text, that's Text_Image_Zho's job. This one is straight lines, and that's fine.
  • Watch the vertical math - linespace and graphspace are applied per line/paragraph, so tall blocks can silently overflow height. Start with the defaults and enlarge the canvas before you touch font size.

For watermarked captions, comic-style dialogue boxes, or any workflow where legible paragraphs need to land on top of a generation, this is the straightforward pick. It won't set the world on fire, but it does exactly what it says - and with the composite nodes from the same pack, wiring rendered text onto an image takes about four nodes total.

CategoryZho模块组/text

Inputs (15)

NameTypeDefaultDescription
textSTRINGZHOZHOZHO
selected_fontCOMBO11 options: Alkatra, Merienda-Black, Merienda-Bold, Merienda-ExtraBold, Merienda-Light, Merienda-Medium, +5
alignCOMBO3 options: left, center, right
wrapINT1200–8096
graphspaceINT100–8096
linespaceINT20–8096
font_sizeINT121–2500
colorCOLORred
outline_sizeINT00–8096
outline_colorCOLORblue
margin_xINT00–8096
margin_yINT00–8096
widthINT5121–8096
heightINT5121–8096
swapBOOLEANfalse

Outputs (1)

NameTypeDescription
imageIMAGE