string2Image _O
Render text to an image, the old way
- string
- IMAGE
string2Image _O turns a piece of text into an image - it renders your string onto a canvas with a chosen font, size, and colours, and outputs it as an IMAGE you can wire into the rest of the graph. The trick that makes that interesting: an image of text can feed ControlNet (like a depth or line-art preprocessor) to place styled text into a generated image. Text-to-image, but with the text as pixels first.
Before you get excited, the honest headline: this is the deprecated version. It's the pre-merge implementation, tucked in O/deprecated/string of the Quality of Life Suit pack, using the legacy STR input type and a fixed, text-mask-sized canvas. The pack's modern replacement - Text2Image _O under O/text - takes native STRING, gives you a proper canvas (width, height, expand, x, y) plus RGBA control over font and background. If you're building anything new, use that one.
How it works
The source does the straightforward Pillow thing: it loads a font from the pack's fonts/ folder, measures your text, creates an RGBA image sized to the text's bounding box, fills it with the background colour, and pastes the glyphs in the font colour. Output is an IMAGE tensor.
Inputs:
string(STR) - the text, in the deprecated dict-wrapped type (so it must come from a legacyString _Onode, not a modern one).font(STRING) - the font file name from the pack'sfonts/folder, defaultCALIBRI.TTF.size(INT) - font size, default 36.font_R/font_G/font_B- font colour, each 0–255 (defaults: black).background_R/background_G/background_B- background colour, 0–255 (defaults: white).
One output: IMAGE.
Notice what's not there: no width, height, or position controls. The image is exactly as big as the rendered text - fine for a ControlNet text pass, awkward if you wanted a specific canvas.
Where it fits
The one genuinely good use is the ControlNet route: render your text to an image, run it through a preprocessor, and condition a generation on it so the model writes the text into the scene the way you asked. That workflow is still valid with this node. But given the STR input requirement and the missing canvas controls, Text2Image _O is strictly better for the same job - and it's the one the README actually documents. Consider this node only for keeping an old workflow alive.
Installing it
Part of the Quality of Life Suit pack (omar92/ComfyUI-QualityOfLifeSuit_Omar92). Install via ComfyUI Manager (search "Quality of Life Suit") or clone:
cd <ComfyUI>/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git
Restart ComfyUI properly. No models to download - the fonts ship with the pack (Calibri, Comic Sans, Alkatra, and friends; drop extra .ttf/.otf/.ttc files into the fonts/ folder and restart to add more).
Common issues
- "The wire won't connect from a normal text node."
STRvsSTRINGagain. Feed it from the legacyString _O, or switch toText2Image _O. - "The image is the wrong size." There's no canvas control - it's text-sized by design. The modern node fixes this.
- "My custom font isn't in the dropdown." This node takes a font name string; make sure the file is in
fonts/and matches exactly (case included). The modern node has a proper dropdown. - "It's deprecated, will it vanish?" The whole deprecated folder is marked for removal. Migrating to
Text2Image _Onow saves you a headache later.
Good idea, outdated implementation. Use Text2Image _O - this one is only here for backward compatibility.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STR | — | |
| font | STRING | CALIBRI.TTF | — |
| size | INT | 360–255 | — |
| font_R | INT | 00–255 | — |
| font_G | INT | 00–255 | — |
| font_B | INT | 00–255 | — |
| background_R | INT | 2550–255 | — |
| background_G | INT | 2550–255 | — |
| background_B | INT | 2550–255 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |