Nodes/Comfyroll Studio/πŸ”€οΈ CR Mask Text
ComfyUI Node Runs on cloud

πŸ”€οΈ CR Mask Text

Renders text onto a flat image β€” not a MASK, despite the name

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,296
πŸ”€οΈ CR Mask Text
  • image
  • IMAGE
  • show_help
β—„texttextβ–Ί
β—„font_nameβ–Ύβ–Ί
β—„font_size50β–Ί
β—„background_colorβ–Ύβ–Ί
β—„alignβ–Ύβ–Ί
β—„justifyβ–Ύβ–Ί
β—„margins0β–Ί
β—„line_spacing0β–Ί
β—„position_x0β–Ί
β—„position_y0β–Ί
β—„rotation_angle0.0β–Ί
β—„rotation_optionsβ–Ύβ–Ί
β—„bg_color_hex#000000β–Ί

Here's the gotcha up front, because it'll save you a debugging session: despite the name, this node's output is an IMAGE, not a ComfyUI MASK. "Mask Text" describes what it draws - text rendered as a flat shape against a background, the kind of thing you'd use as a matte or a text-shaped overlay - not the data type it hands back. If your workflow needs an actual MASK tensor to feed an inpaint or composite node, you'll run this node's output through a separate Image-to-Mask conversion afterward.

How it works

Give it a base image, some text, and a font (font_name - the pack ships its own font files, everything from a plain Roboto to a comic-book impact.ttf to an Arabic-script font, so you're not limited to whatever's installed system-wide). From there it's mostly layout controls: font_size, align (center/top/bottom) and justify (center/left/right) for positioning within the frame, margins and line_spacing for multi-line text, position_x/position_y for fine placement, and rotation_angle with rotation_options (rotate around the text's own center, or the whole image's center) if you want angled text. background_color picks from a large built-in palette (30 named colors plus a custom option that reads bg_color_hex for anything not on the list).

The result is a new IMAGE with your text rendered onto the chosen background at the size/position/rotation you set - essentially a text-graphic generator, useful for banners, watermarks, comic panel captions, or any of the template-style graphics Comfyroll's Graphics section is built around.

Inputs and outputs that matter

  • image, text, font_name, font_size - the basics.
  • align, justify, margins, line_spacing, position_x, position_y - layout.
  • rotation_angle, rotation_options - angle the text if you need it.
  • background_color (with optional bg_color_hex for custom colors).
  • Output: IMAGE (again - not MASK), plus show_help.

How to install it

ComfyUI Manager: search "Comfyroll Studio", install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, restart. The font files ship inside the repo itself, so there's nothing extra to download for this one specifically.

Common issues

The name-versus-output-type mismatch above is the single most common point of confusion - plan for an extra conversion step if you actually need a MASK downstream, rather than wiring this straight into a node that expects one and wondering why it errors on type mismatch.

Text overflow is the other practical issue: there's no auto-shrink-to-fit here, so a long string at a large font_size can run past the edges of your image or overlap itself depending on margins and line_spacing. Preview the output at your actual canvas size before building a template around specific position values.

And the standing pack-wide caveat, worth repeating for this node specifically since it lives in the Graphics section: real install reports for Comfyroll show a broken import throwing Failed to load Graphics nodes in the console and taking every node in this category down at once, this one included. If CR Mask Text (or any of its Graphics siblings) is missing from your node search, that's the first thing to check - reinstall with a clean git clone rather than chasing individual pip errors.

Category🧩 Comfyroll Studio/πŸ‘Ύ Graphics/πŸ”€ Text

Inputs (14)

NameTypeDefaultDescription
imageIMAGEβ€”
textSTRINGtextβ€”
font_nameCOMBO10 options: Roboto-Regular.ttf, Quicksand-Bold.ttf, Oswald-Bold.ttf, comic.ttf, AlumniSansCollegiateOne-Regular.ttf, NotoSansArabic-Regular.ttf, +4
font_sizeINT501–1024β€”
background_colorCOMBO30 options: custom, white, black, red, green, blue, +24
alignCOMBO3 options: center, top, bottom
justifyCOMBO3 options: center, left, right
marginsINT0-1024–1024β€”
line_spacingINT0-1024–1024β€”
position_xINT0-4096–4096β€”
position_yINT0-4096–4096β€”
rotation_angleFLOAT0.0-360–360β€”
rotation_optionsCOMBO2 options: text center, image center
bg_color_hexoptSTRING#000000β€”

Outputs (2)

NameTypeDescription
IMAGEIMAGEβ€”
show_helpSTRINGβ€”