AnyText Composer
Merge multiple font images into one AnyText layout
- font_or_bg_img
- font_img2
- font_img3
- font_img4
- font_img5
- font_img6
- font_img7
- font_img8
- font_img9
- font_img10
- font_img
When you're laying out several pieces of text - different fonts, colors, positions - you render each one as its own font image, and then you need to stack them into a single canvas before AnyText samples against it. UL_AnyTextComposer is that stacker. Feed it up to ten font images and it composites them into one, which is your combined glyph layout.
It's a small, practical node. If your design has one text element, you don't need it. The moment you have a headline in one font and a caption in another, this is how you get them onto the same page.
How it works
The first image (font_or_bg_img) is your base - a background, or the first font layer. Each additional font_img2 through font_img10 gets composited on top in order. The mode boolean flips how the combine happens (overlay behavior versus straight compositing), which is the one setting you'll toggle depending on whether your inputs have transparent backgrounds. The output is a single merged IMAGE. This is a flagged output node, so it'll display the composite result directly in the graph - handy for eyeballing the layout.
The inputs and outputs that matter
font_or_bg_img(IMAGE, required) - the base layer. Either a background image or your first rendered font image.font_img2…font_img10(IMAGE, optional) - up to nine more layers to stack on. Connect as many as you have; leave the rest empty.mode(BOOLEAN, default on) - how the layers combine. Flip it if the compositing isn't respecting transparency the way you want.
Output is font_img (IMAGE), the merged layout - send it wherever your workflow consumes the combined glyph image.
How to install it
ComfyUI Manager, search ComfyUI_Anytext, or:
cd ComfyUI/custom_nodes
git clone https://github.com/zmwv823/ComfyUI_Anytext
then restart. No models or fonts of its own - it just composites images that other nodes (the FontImg nodes) produced.
Common issues & troubleshooting
Layers cover each other up. The inputs stack in order, and if your font images have opaque backgrounds each one paints over the last. Render the font images with a transparent background (the FontImg nodes support a transparent bg_color), and toggle mode so the composite respects it.
Sizes don't line up. The layers should share dimensions. If you rendered font images at different width/height, they won't register cleanly - match the sizes upstream.
UL_AnyTextComposer vs UL_AnyText_Composer. The pack ships both, with identical inputs and outputs - same node, two names across revisions. Whichever your graph has is correct; there's no difference to hunt for.
Do I actually need it? Only for multi-element text. A single line of text goes straight from a FontImg node to the encoder without a compositing step. Reach for the Composer when you're combining separately-styled pieces into one layout.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | BOOLEAN | true | cv2_add for canny img, pil_paste for img with alpha channel. |
| font_or_bg_img | IMAGE | — | |
| font_img2opt | IMAGE | — | |
| font_img3opt | IMAGE | — | |
| font_img4opt | IMAGE | — | |
| font_img5opt | IMAGE | — | |
| font_img6opt | IMAGE | — | |
| font_img7opt | IMAGE | — | |
| font_img8opt | IMAGE | — | |
| font_img9opt | IMAGE | — | |
| font_img10opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| font_img | IMAGE | — |