Nodes/ComfyUI_Anytext/Glyph-ByT5 Fonts
ComfyUI Node

Glyph-ByT5 Fonts

Define the text lines for Glyph-SDXL

By zmwv823·Created 2 years ago·Updated about a year ago· 103
Glyph-ByT5 Fonts
    • font_params
    font_text1身无彩凤双飞翼, 心有灵犀一点通。
    font_color1red
    font_name1Chinese: HYQiHei-AZEJ
    font_text2除夜を祝う.
    font_color2black
    font_name2Japanese: JackeyFont
    font_text3It's not easy to build a node.
    font_color3yellow
    font_name3English: DMSerifDisplay-Regular
    font_text4전문 메이크업 아티스트 아름다운 한복 무료 촬영.
    font_color4brown
    font_name4Korean: TDTDLatteOTF
    font_text5Ответьте, пожалуйста, на номер +123-456-7890.
    font_color5gold
    font_name5Russian: TTRamillas-Italic
    font_text6A TERRA É O QUE TODOS NÓS TEMOS EM COMUM.
    font_color6chocolate
    font_name6Portuguese: Gliker-Regular

    This is the text-layout node for the Glyph-ByT5 side of the pack. Glyph-ByT5 is a Microsoft research project - a character-aware text encoder fine-tuned from ByT5 that, bolted onto SDXL, produces "Glyph-SDXL" and can render whole paragraphs of accurate text, in around ten languages, at a spelling accuracy the original SDXL couldn't touch. UL_Image_Generation_Glyph_ByT5_Font is where you specify what that text says, in what font, and in what color - up to six independent lines.

    It's the most-searched node in this pack by a wide margin, which makes sense: multilingual paragraph text was a genuinely hard problem in the SDXL era, and this was one of the few open answers.

    How it works

    No model runs here - it's a parameters builder. Each of the six slots is a triple: font_textN (the actual text, multiline, so line breaks are fine), font_colorN (a named color), and font_nameN (the typeface). The font list is huge - thousands of entries, tagged by language (Chinese, Japanese, Korean, English, Russian, Portuguese and more) - which is the point, since Glyph-ByT5's whole claim is multilingual glyph accuracy. The node packs all six triples into one Glyph_SDXL_Font_Params object that the Glyph-ByT5 sampler consumes.

    The inputs and outputs that matter

    • font_text1font_text6 (multiline STRING) - the text for each line. Leave a slot's text as-is or blank if you don't need all six. The defaults are a showcase of languages on purpose.
    • font_name1font_name6 - the font per line, chosen from a language-tagged list of thousands. Match the font's language to your text (a Latin font won't render Chinese glyphs).
    • font_color1font_color6 - named color per line, ~137 options.

    Output is font_params (Glyph_SDXL_Font_Params) - wire it into UL_Image_Generation_Glyph_ByT5.

    How to install it

    ComfyUI Manager, search ComfyUI_Anytext, or:

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

    then restart. Glyph-ByT5 needs its own weights: the Glyph-SDXL checkpoints go in ComfyUI/custom_nodes/ComfyUI_Anytext/Image_Generation/Glyph_SDXL/checkpoints, and google/byt5-small goes in ComfyUI/models/text_encoders (or use the Auto_Download option). The fonts referenced here ship with the Glyph-SDXL font set.

    Common issues & troubleshooting

    A line renders as boxes or blanks. Font/language mismatch. Each font is tagged by language for a reason - pick a Chinese font for Chinese text, a Latin font for English. The huge font list is there precisely so you can match glyphs to script.

    This is the layout node, not the generator. By itself it produces nothing visible. It only builds font_params; the actual image comes from the Glyph-ByT5 sampler downstream.

    The bigger caveat: Glyph-ByT5 is the rough part of this pack. The author flags it as "TEST FAILED ON MY PC," and the model has real limits - output resolution is locked to 1024×1024 with a 1:1 aspect ratio, and the background quality can come out worse than plain SDXL. On top of that, Microsoft pulled the original Glyph-ByT5 weights (trained on a private dataset, pending review), so sourcing a working checkpoint is itself a hunt. Set expectations accordingly: this is an impressive research idea wrapped in a fragile, hard-to-provision node, not a dependable production path.

    CategoryUL Group/Image Generation

    Inputs (18)

    NameTypeDefaultDescription
    font_text1STRING身无彩凤双飞翼, 心有灵犀一点通。
    font_color1COMBOred138 options: white, black, darkslategray, dimgray, darkolivegreen, midnightblue, +132
    font_name1COMBOChinese: HYQiHei-AZEJ3582 options: Chinese: HelloFont-FangHuaTi, Chinese: HelloFont-ID-DianFangSong-Bold, Chinese: HelloFont-ID-DianFangSong, Chinese: HelloFont-ID-DianHei-CEJ, Chinese: HelloFont-ID-DianHei-DEJ, Chinese: HelloFont-ID-DianHei-EEJ, +3576
    font_text2STRING除夜を祝う.
    font_color2COMBOblack138 options: white, black, darkslategray, dimgray, darkolivegreen, midnightblue, +132
    font_name2COMBOJapanese: JackeyFont3582 options: Chinese: HelloFont-FangHuaTi, Chinese: HelloFont-ID-DianFangSong-Bold, Chinese: HelloFont-ID-DianFangSong, Chinese: HelloFont-ID-DianHei-CEJ, Chinese: HelloFont-ID-DianHei-DEJ, Chinese: HelloFont-ID-DianHei-EEJ, +3576
    font_text3STRINGIt's not easy to build a node.
    font_color3COMBOyellow138 options: white, black, darkslategray, dimgray, darkolivegreen, midnightblue, +132
    font_name3COMBOEnglish: DMSerifDisplay-Regular3582 options: Chinese: HelloFont-FangHuaTi, Chinese: HelloFont-ID-DianFangSong-Bold, Chinese: HelloFont-ID-DianFangSong, Chinese: HelloFont-ID-DianHei-CEJ, Chinese: HelloFont-ID-DianHei-DEJ, Chinese: HelloFont-ID-DianHei-EEJ, +3576
    font_text4STRING전문 메이크업 아티스트 아름다운 한복 무료 촬영.
    font_color4COMBObrown138 options: white, black, darkslategray, dimgray, darkolivegreen, midnightblue, +132
    font_name4COMBOKorean: TDTDLatteOTF3582 options: Chinese: HelloFont-FangHuaTi, Chinese: HelloFont-ID-DianFangSong-Bold, Chinese: HelloFont-ID-DianFangSong, Chinese: HelloFont-ID-DianHei-CEJ, Chinese: HelloFont-ID-DianHei-DEJ, Chinese: HelloFont-ID-DianHei-EEJ, +3576
    font_text5STRINGОтветьте, пожалуйста, на номер +123-456-7890.
    font_color5COMBOgold138 options: white, black, darkslategray, dimgray, darkolivegreen, midnightblue, +132
    font_name5COMBORussian: TTRamillas-Italic3582 options: Chinese: HelloFont-FangHuaTi, Chinese: HelloFont-ID-DianFangSong-Bold, Chinese: HelloFont-ID-DianFangSong, Chinese: HelloFont-ID-DianHei-CEJ, Chinese: HelloFont-ID-DianHei-DEJ, Chinese: HelloFont-ID-DianHei-EEJ, +3576
    font_text6STRINGA TERRA É O QUE TODOS NÓS TEMOS EM COMUM.
    font_color6COMBOchocolate138 options: white, black, darkslategray, dimgray, darkolivegreen, midnightblue, +132
    font_name6COMBOPortuguese: Gliker-Regular3582 options: Chinese: HelloFont-FangHuaTi, Chinese: HelloFont-ID-DianFangSong-Bold, Chinese: HelloFont-ID-DianFangSong, Chinese: HelloFont-ID-DianHei-CEJ, Chinese: HelloFont-ID-DianHei-DEJ, Chinese: HelloFont-ID-DianHei-EEJ, +3576

    Outputs (1)

    NameTypeDescription
    font_paramsGlyph_SDXL_Font_Params