Nodes/BaiduMeux_Comfy Tools/Meux Artistic Text Preview
ComfyUI Node

Meux Artistic Text Preview

Bake styled text into the image without leaving ComfyUI

By fchangjun·Created about a year ago·Updated 5 months ago· 4
Meux Artistic Text Preview
    • image
    • mask
    textHello Art Text
    font_nameAlibaba_PuHuiTi_2.0_105_Heavy_105_Heavy
    width1024
    height1024
    font_size_modefixed
    font_size128
    char_spacing0
    line_spacing0
    text_aligncenter
    vertical_alignmiddle
    boldfalse
    italicfalse
    background_color#000000
    background_opacity0.00
    padding_percent0.10
    fill_typesolid
    fill_color_1#ff3b30
    fill_color_2#ffd84d
    fill_directiontop_bottom
    outline_typenone
    outline_width6
    outline_opacity1.00
    outline_color_1#ffffff
    outline_color_2#00d4ff
    outline_directionleft_right
    effect_presetnone
    effect_strength1.00
    shadow_modepreset
    shadow_color#000000
    shadow_offset_x4
    shadow_offset_y4
    shadow_opacity0.35
    shadow_blur6.0

    Text on images is one of those things you usually leave ComfyUI for - render, open Photoshop or GIMP, add the title, come back. If you're producing thumbnails, logos, or title cards in a batch workflow, this node exists to kill that round trip: it renders styled text on a transparent canvas and hands you both the image and a matching mask, so you can composite it straight onto your render.

    It ships in the Baidu Meux ComfyTools pack, and it's easily the most feature-dense node in it. Fill, outline, shadow, inner shadow, glow, gradients, per-character spacing, alignment - the kind of surface area you'd expect from a dedicated text tool, not a utility node.

    How it works

    The node renders your text to a text mask with Pillow, then builds up layers - fill, outline, effects - and composites them over an optional background. It outputs two things: an RGBA IMAGE preview and a MASK derived from the text's alpha. Keep background_opacity at 0 and the image comes out fully transparent, ready for compositing.

    Fonts are the interesting bit. The node looks in the pack's own fonts/ folder first, so drop in any font file there and it appears in the font_name dropdown. If it's not there, it falls back to bundled and system fonts. The bundled defaults are Alibaba PuHuiTi variants, a CJK typeface family - perfectly usable for Latin text, but if you want a specific look, add your own font and refresh.

    Two font sizing modes: fixed uses the literal font_size; fit scales the text down to fit the canvas. It won't scale up past your font_size, so think of that as the cap.

    The inputs that matter

    • text - multi-line supported, newlines and all.
    • font_name - dropdown, populated from your fonts/ folder first.
    • width / height - the output canvas, up to 4096.
    • font_size_mode / font_size - fixed vs fit.
    • fill_type - solid, gradient, or none; for gradients pick fill_color_1, fill_color_2, and a fill_direction.
    • outline_type / outline_width - solid or gradient stroke around the glyphs.
    • effect_preset - one-click soft_shadow, heavy_shadow, soft_glow, neon_glow, engraved, or shadow_glow, with effect_strength as a multiplier.
    • background_opacity - 0 means fully transparent.

    Outputs: image (the rendered IMAGE) and mask (the text alpha). Wire image into a composite node over your render, or save both.

    Installing it

    Pack install, same as everything in this set:

    cd ComfyUI/custom_nodes
    git clone https://github.com/fchangjun/Comfyui_MultiSaveImage
    cd Comfyui_MultiSaveImage
    pip install -r requirements.txt
    

    Or use ComfyUI Manager (search "Baidu Meux ComfyTools"). Restart, then add your fonts:

    cp MyFont.ttf ComfyUI/custom_nodes/Comfyui_MultiSaveImage/fonts/
    

    Restart (or reload) and the font shows up in the dropdown.

    Where people get burned

    • Font doesn't appear. It's cached, or it's in the wrong folder - the pack's fonts/ directory, not ComfyUI's.
    • Defaults feel Chinese-first. The bundled defaults are PuHuiTi weights. Nothing wrong with them for Latin text, but that "why is my default font so heavy" reaction is usually just the Alibaba Heavy/Black default doing its thing.
    • Mask looks hard-edged when composited. The mask comes from the text alpha, so it's sharp by design. If you want a soft edge, blur it downstream.

    If you do text-on-image work, this node is the reason to install a pack you might otherwise skip. It's the rare ComfyUI text node that doesn't feel like a toy.

    Categoryimage/text

    Inputs (33)

    NameTypeDefaultDescription
    textSTRINGHello Art Text
    font_nameCOMBOAlibaba_PuHuiTi_2.0_105_Heavy_105_Heavy14 options: Alibaba_PuHuiTi_2.0_105_Heavy_105_Heavy, Alibaba_PuHuiTi_2.0_115_Black_115_Black, Alibaba_PuHuiTi_2.0_35_Thin_35_Thin, Alibaba_PuHuiTi_2.0_45_Light_45_Light, Alibaba_PuHuiTi_2.0_55_Regular_55_Regular, Alibaba_PuHuiTi_2.0_55_Regular_85_Bold, +8
    widthINT102464–4096
    heightINT102464–4096
    font_size_modeCOMBOfixed2 options: fixed, fit
    font_sizeINT1288–1024
    char_spacingINT0-20–200
    line_spacingINT0-512–512
    text_alignCOMBOcenter3 options: left, center, right
    vertical_alignCOMBOmiddle3 options: top, middle, bottom
    boldBOOLEANfalse
    italicBOOLEANfalse
    background_colorSTRING#000000
    background_opacityFLOAT0.000–1
    padding_percentFLOAT0.100–0.45
    fill_typeCOMBOsolid3 options: solid, gradient, none
    fill_color_1STRING#ff3b30
    fill_color_2STRING#ffd84d
    fill_directionCOMBOtop_bottom6 options: left_right, right_left, top_bottom, bottom_top, diagonal, diagonal_reverse
    outline_typeCOMBOnone3 options: none, solid, gradient
    outline_widthINT60–128
    outline_opacityFLOAT1.000–1
    outline_color_1STRING#ffffff
    outline_color_2STRING#00d4ff
    outline_directionCOMBOleft_right6 options: left_right, right_left, top_bottom, bottom_top, diagonal, diagonal_reverse
    effect_presetCOMBOnone7 options: none, soft_shadow, heavy_shadow, soft_glow, neon_glow, engraved, +1
    effect_strengthFLOAT1.000–3
    shadow_modeCOMBOpreset2 options: preset, custom
    shadow_colorSTRING#000000
    shadow_offset_xINT4-512–512
    shadow_offset_yINT4-512–512
    shadow_opacityFLOAT0.350–1
    shadow_blurFLOAT6.00–128

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    maskMASK