Nodes/ComfyUI_Anytext/AnyText Composer
ComfyUI Node

AnyText Composer

Composite up to ten font images into one canvas

By zmwv823·Created 2 years ago·Updated about a year ago· 103
AnyText Composer
  • font_or_bg_img
  • font_img2
  • font_img3
  • font_img4
  • font_img5
  • font_img6
  • font_img7
  • font_img8
  • font_img9
  • font_img10
  • font_img
modetrue

This node merges several rendered text layers into a single image. In an AnyText layout with more than one text element - a title in one font, a subtitle in another, a logo mark somewhere else - each gets rendered separately, and UL_AnyText_Composer combines them into the one canvas AnyText will sample against. Up to ten layers in, one image out.

If you've bumped into UL_AnyTextComposer (no underscore), it's the same node under a sibling name. The pack keeps both across revisions with identical behavior.

How it works

The first input (font_or_bg_img) is the base - a background or your first font layer - and each optional font_img2 through font_img10 stacks on top in order. The mode boolean controls the compositing behavior (how upper layers blend over lower ones), which matters mostly when your layers have transparency. It's an output node, so the merged result renders right in the graph for a quick visual check before it goes downstream.

The inputs and outputs that matter

  • font_or_bg_img (IMAGE, required) - the base layer, background or first text render.
  • font_img2font_img10 (IMAGE, optional) - nine additional layers, stacked in order. Wire as many as you have.
  • mode (BOOLEAN, default on) - the combine behavior. Toggle it if transparency isn't handled the way you expect.

Output: font_img (IMAGE), the composited layout.

How to install it

ComfyUI Manager, search ComfyUI_Anytext, or:

cd ComfyUI/custom_nodes
git clone https://github.com/zmwv823/ComfyUI_Anytext

then restart. It needs no models or fonts - it operates purely on images the FontImg nodes feed it.

Common issues & troubleshooting

Upper layers hide lower ones. Layers paint in order, so opaque backgrounds cover what's underneath. Render your font images with a transparent background and flip mode so the composite honors it.

Mismatched dimensions. The layers should be the same size. Different width/height on the source renders means they won't align - fix the sizes upstream in the FontImg nodes.

Underscore vs no underscore. UL_AnyText_Composer and UL_AnyTextComposer are the same node. Don't spend a second choosing - they behave identically.

The result renders in the graph but nothing goes downstream. This is a flagged output node, so it displays the composite directly - but you still have to wire font_img onward if a later node needs it. The preview and the output are the same image; don't assume the display means it's connected.

When to use it. Only when you have multiple, separately-styled text elements to combine. One line of text doesn't need compositing; it flows straight from a FontImg node into the encoder. The Composer earns its slot on multi-element designs - posters, cards, anything with a mix of fonts or colors. If your layout is a single headline, skip it entirely and save yourself a node.

CategoryUL Group/Image Generation

Inputs (11)

NameTypeDefaultDescription
modeBOOLEANtruecv2_add for canny img, pil_paste for img with alpha channel.
font_or_bg_imgIMAGE
font_img2optIMAGE
font_img3optIMAGE
font_img4optIMAGE
font_img5optIMAGE
font_img6optIMAGE
font_img7optIMAGE
font_img8optIMAGE
font_img9optIMAGE
font_img10optIMAGE

Outputs (1)

NameTypeDescription
font_imgIMAGE