String To Image
Render text as a picture
- images
- STRING
Exactly what it says: it takes a string and draws it onto an image at the font size you pick. You get a picture of your text, ready to preview, save, or composite into a generation. Simple, useful, and the kind of node you don't think about until you need a bit of readable text baked into a frame or a clear heading on a workflow screenshot.
If you've looked at the pack's String2FatLabels clh node, you've basically seen this one - same inputs, same outputs, same job. They're twins. The "FatLabels" framing leans toward big workflow labels; "String To Image" is the plainer name for the same text-to-picture trick. Pick whichever you find first; there's no meaningful difference to agonize over.
How it works
Feed it text and a size, it renders the words onto an image canvas and returns that image. It's an output node, so it displays the result on the node and writes it to your ComfyUI output directory - handy, because it means the node is both your text-renderer and your save step in one. An optional font path lets you swap the typeface.
Where you'd actually use it: a caption or watermark-style label composited over a generated image, a title card, readable text on a frame for a video workflow, or the same labelling-for-screenshots use the pack was originally built around.
The inputs and outputs that matter
text(multiline) - the string to render. Multi-line input, so headings plus a second line both work.font_size(default 36, minimum 1) - how large the text is drawn. Bigger for titles, smaller for captions.font_path(optional) - path to a specific font file. Leave it empty to use the default typeface; point it at a.ttf/.otffor a custom look.
Two outputs: images (an IMAGE) - the rendered text picture, which wires into Preview Image, Save Image, or a compositing node exactly like any other image - and a STRING pass-through of the text you gave it.
Installing it
ComfyUI Manager: search Clh Tool for ComfyUI, install, restart. Or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/clhui/ComfyUi-clh-Tool
and restart ComfyUI. If the node doesn't appear after a manual clone, look at the ComfyUI startup console - rendering text to an image relies on an imaging library, and a missing import shows up there. Manager installs a pack's dependencies automatically; a bare git clone leaves that to you.
Common issues
The font is the usual culprit. A bad or non-existent font_path will break rendering or fall back unexpectedly - start with no custom font, confirm the default works, then swap in a real font file path if you want a different look.
The other is text overrunning the canvas: a large font_size paired with a long string can clip. If part of your label vanishes, cut the text down or lower the size and re-run. And to state the obvious so nobody's surprised - this makes an image of text, not editable text on top of an existing image. It renders words onto a canvas; to lay that text over a generation you composite the two images together downstream. For pure on-screen labels where you just want to read a value, Show Text clh is the lighter option; reach for this when you specifically need the text as an image.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| font_size | INT | 36 | — |
| font_pathopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| STRING | STRING | — |