Nodes/ComfyUI_Anytext/AnyText2 Fonts
ComfyUI Node

AnyText2 Fonts

Per-line fonts and colors for AnyText2

By zmwv823·Created 2 years ago·Updated about a year ago· 103
AnyText2 Fonts
    • fonts
    font_hollowfalse
    font_nameAnyText-Arial-Unicode.ttf
    font_colorred
    font_name1阿里妈妈东方大楷.otf
    font_color1green
    font_name2仿乾隆字体.ttf
    font_color2blue
    font_name3站酷小薇LOGO体.otf
    font_color3white
    font_name4None
    font_color4None
    font_name5索尼兰亭.ttf
    font_color5yellow
    font_name6日系筑紫a丸GBK版.ttf
    font_color6pink
    font_name7阿朱泡泡体.ttf
    font_color7gold

    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_namefont_name7 - the font per line. These read None on this listing because the crawl instance had no fonts installed; on your machine they list ComfyUI/models/fonts. The defaults hint at what AnyText2 ships with (Arial Unicode, plus several CJK display faces).
    • font_colorfont_color7 - the color per line, from a named palette of ~148 colors (plus None).
    • 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.

    CategoryUL Group/Image Generation

    Inputs (17)

    NameTypeDefaultDescription
    font_hollowBOOLEANfalse
    font_nameCOMBOAnyText-Arial-Unicode.ttf1 options: None
    font_colorCOMBOred149 options: None, red, green, blue, white, black, +143
    font_name1COMBO阿里妈妈东方大楷.otf1 options: None
    font_color1COMBOgreen149 options: None, red, green, blue, white, black, +143
    font_name2COMBO仿乾隆字体.ttf1 options: None
    font_color2COMBOblue149 options: None, red, green, blue, white, black, +143
    font_name3COMBO站酷小薇LOGO体.otf1 options: None
    font_color3COMBOwhite149 options: None, red, green, blue, white, black, +143
    font_name4COMBONone1 options: None
    font_color4COMBONone149 options: None, red, green, blue, white, black, +143
    font_name5COMBO索尼兰亭.ttf1 options: None
    font_color5COMBOyellow149 options: None, red, green, blue, white, black, +143
    font_name6COMBO日系筑紫a丸GBK版.ttf1 options: None
    font_color6COMBOpink149 options: None, red, green, blue, white, black, +143
    font_name7COMBO阿朱泡泡体.ttf1 options: None
    font_color7COMBOgold149 options: None, red, green, blue, white, black, +143

    Outputs (1)

    NameTypeDescription
    fontsANYTEXT_FONTS