AnyText2 Fonts
Per-line fonts and colors for AnyText2
- fonts
AnyText2's headline feature over the original is customizable per-line attributes - the "Visual Text Generation and Editing With Customizable Attributes" in its title. Plainly: each line of text can have its own font and its own color. UL_AnyText2Fonts is where you set those. You define up to eight font-and-color pairs, and the node bundles them into an ANYTEXT_FONTS object that the AnyText2 pipeline consumes.
So if you want line one in a bold display face in red, line two in a handwriting font in blue, and line three hollow-outlined, this is the node that carries that intent into the model.
How it works
There's no rendering or diffusion here - it's a configuration node. You pick a font and a color for each slot (font_name/font_color, then font_name1/font_color1, and so on up to slot 7), plus a global font_hollow toggle for outlined text, and the node packages all of it into the single ANYTEXT_FONTS output. AnyText2 then applies each slot's font and color to the corresponding line of your text. Unused slots you leave on None.
The inputs and outputs that matter
font_name…font_name7- the font per line. These readNoneon this listing because the crawl instance had no fonts installed; on your machine they listComfyUI/models/fonts. The defaults hint at what AnyText2 ships with (Arial Unicode, plus several CJK display faces).font_color…font_color7- the color per line, from a named palette of ~148 colors (plusNone).font_hollow(BOOLEAN, default off) - render outlined/hollow glyphs instead of solid fill.
Output is fonts (ANYTEXT_FONTS) - a single object wiring the whole per-line font/color scheme into the AnyText2 graph.
How to install it
ComfyUI Manager, search ComfyUI_Anytext, or:
cd ComfyUI/custom_nodes
git clone https://github.com/zmwv823/ComfyUI_Anytext
then restart. AnyText2 needs its own control model (control_sd15_anytext_v2.0.safetensors) or the full anytext_v2.0.ckpt, plus fonts in ComfyUI/models/fonts. The named fonts in the defaults come from AnyText2's font set - grab them from the AnyText2 repo or ModelScope if the dropdowns are bare.
Common issues & troubleshooting
Font dropdowns are empty. No fonts in models/fonts. AnyText2 leans on a specific set of display fonts for its per-line look; without them installed, this node has nothing to offer. Pull the AnyText2 font folder into models/fonts.
A line ignores its color or font. Slot order maps to line order. If line two picks up line one's styling, your slot assignments are off by one - line them up with the actual text order.
AnyText2 editing is flaky. Worth knowing before you invest: the pack author states directly that AnyText2's edit path "seems not work well in my repo, need more work." Generation is the more reliable mode here; if you're trying to edit text in an existing image with v2.0 and it's misbehaving, that's a known rough edge, not you. For best results the author points people at the official AnyText2 demo.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| font_hollow | BOOLEAN | false | — |
| font_name | COMBO | AnyText-Arial-Unicode.ttf | 1 options: None |
| font_color | COMBO | red | 149 options: None, red, green, blue, white, black, +143 |
| font_name1 | COMBO | 阿里妈妈东方大楷.otf | 1 options: None |
| font_color1 | COMBO | green | 149 options: None, red, green, blue, white, black, +143 |
| font_name2 | COMBO | 仿乾隆字体.ttf | 1 options: None |
| font_color2 | COMBO | blue | 149 options: None, red, green, blue, white, black, +143 |
| font_name3 | COMBO | 站酷小薇LOGO体.otf | 1 options: None |
| font_color3 | COMBO | white | 149 options: None, red, green, blue, white, black, +143 |
| font_name4 | COMBO | None | 1 options: None |
| font_color4 | COMBO | None | 149 options: None, red, green, blue, white, black, +143 |
| font_name5 | COMBO | 索尼兰亭.ttf | 1 options: None |
| font_color5 | COMBO | yellow | 149 options: None, red, green, blue, white, black, +143 |
| font_name6 | COMBO | 日系筑紫a丸GBK版.ttf | 1 options: None |
| font_color6 | COMBO | pink | 149 options: None, red, green, blue, white, black, +143 |
| font_name7 | COMBO | 阿朱泡泡体.ttf | 1 options: None |
| font_color7 | COMBO | gold | 149 options: None, red, green, blue, white, black, +143 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| fonts | ANYTEXT_FONTS | — |