ComfyUI Node

Text Block

Text Block renders nothing — and that's the whole point

By LaoMaoBoss·Created about a year ago·Updated 5 days ago· 0
Text Block
    • text_block
    textHello, WBLESS!
    font_family
    font_weight
    font_size50
    font_color
    font_color_hex#FFFFFF
    letter_spacing0
    newlinefalse
    auto_newlinefalse
    auto_newline_width300
    expand_advancedfalse
    horizontal_spacing0
    vertical_spacing0
    rotation_angle0.0
    rotation_optionstext center
    italicfalse
    boldfalse
    underlinefalse
    strikethroughfalse
    text_casenormal
    vertical_alignnormal
    opacity1.00
    set_as_defaultfalse

    Text Block is the single most confusingly-named node in the WBLESS pack, because it does not render any text. You connect it, hit run, and nothing appears on your image. That's not a bug - it's a design. Text Block is the child half of a two-node text system: it packages your text and its styling into a TEXT_BLOCK struct, and the sibling Overlay Text node is the one that actually draws it onto an image. Think of Text Block as a styled text string and Overlay Text as the canvas it lands on. If you skip that wiring, Text Block produces a value you can't even see.

    So why does this exist at all? Because stock ComfyUI has no built-in text-on-image node, and for anyone making memes, posters, subtitles, or batch-generating ad creatives, that's a genuinely annoying gap. This system fills it with a level of control that's closer to a CSS text box than to most image editors' "add text" buttons. Multiple Text Blocks feed multiple text_block slots on one Overlay Text node, so a single image can carry different fonts, colors, and rotations per chunk - a caption plus a stylized title, say.

    How it works

    Each Text Block resolves a real font file (the pack scans a bundled fonts/ folder plus your system fonts, local fonts sorted first), then packages the text, font path, size, color, spacing, and transforms into a single struct. The parent Overlay Text node consumes that struct along with its own layout controls - align, justify, position_x/y, line_spacing, rotation - and renders it onto your image, giving you both an image and a text_mask output. The two-node split feels like ceremony at first, but it's what lets you reuse one styled block across several images or swap styling without touching the layout.

    The inputs that matter

    You'll live in these five:

    • text - the string. Multiline, so actual multi-line captions work.
    • font_family - a dynamic dropdown of your bundled plus system fonts (the pack ships Source Han Serif; DejaVu and friends come from your OS). The available font_weight options change to match the family you pick.
    • font_size - 1 to 1024.
    • font_color - 30 presets, or pick custom and set font_color_hex.
    • letter_spacing - tightens or loosens the text.

    Everything else hides behind expand_advanced: rotation_angle with a text center / image center pivot, italic / bold / underline / strikethrough, text_case (uppercase, title case…), vertical_align (superscript/subscript), per-block opacity, and auto_newline with a width limit for wrapping. set_as_default saves the block's styling as the default so the next block starts from it. Output is a single text_block.

    Gotchas worth knowing

    • Fonts are discovered at startup from the pack's fonts/ folder and your system. If a font isn't in the dropdown, drop the file into ComfyUI/custom_nodes/ComfyUI-WBLESS/fonts/ and restart - that's the intended way to add your own.
    • If you're connected to Overlay Text and text still doesn't appear, check the parent's position_x/y and opacity before blaming the block. Defaults center the text, so the classic failure is text sitting at the canvas edge.

    Installing it

    Text Block lives in the ComfyUI-WBLESS grab-bag, so the install is the pack's:

    cd ComfyUI/custom_nodes
    git clone https://github.com/LaoMaoBoss/ComfyUI-WBLESS.git
    

    then restart (or ComfyUI Manager → search "ComfyUI-WBLESS"). No pip deps, no model files - the pack vendors everything in lib/. Look for it under the 🌈WBLESS category, and remember: without Overlay Text upstream of your image, it's a text block going nowhere.

    Category🌈WBLESS

    Inputs (23)

    NameTypeDefaultDescription
    textSTRINGHello, WBLESS!
    font_familyCOMBO18 options: 🖥️ 系统字体, C059, D050000L, DejaVu Sans, DejaVu Sans Mono, DejaVu Serif, +12
    font_weightCOMBO15 options: Light, Regular, Book, Bold, Bold Italic, Bold Oblique, +9
    font_sizeINT501–1024
    font_colorCOMBO30 options: custom, white, black, red, green, blue, +24
    font_color_hexSTRING#FFFFFF
    letter_spacingINT0-50–100
    newlineBOOLEANfalse
    auto_newlineBOOLEANfalse
    auto_newline_widthINT30050–2048
    expand_advancedBOOLEANfalse
    horizontal_spacingoptINT0-200–200
    vertical_spacingoptINT0-200–200
    rotation_angleoptFLOAT0.0-360–360
    rotation_optionsoptCOMBOtext center2 options: text center, image center
    italicoptBOOLEANfalse
    boldoptBOOLEANfalse
    underlineoptBOOLEANfalse
    strikethroughoptBOOLEANfalse
    text_caseoptCOMBOnormal5 options: normal, uppercase, lowercase, capitalize, title
    vertical_alignoptCOMBOnormal3 options: normal, superscript, subscript
    opacityoptFLOAT1.000–1
    set_as_defaultoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    text_blockTEXT_BLOCK