Nodes/GraftingRayman/GR Text Overlay
ComfyUI Node

GR Text Overlay

A caption and watermark burner with a genuinely deep background-box system

By GraftingRayman·Created 2 years ago·Updated about a month ago· 76
GR Text Overlay
  • image
  • IMAGE
  • MASK
  • MASK
textHello
fontDejaVu Sans
font_size32
vertical_alignmentbottom
horizontal_alignmentcenter
justificationleft
padding16
stroke_thickness2
stroke_colourblack
fill_colourwhite
line_spacing0.00
letter_spacing0.00
x_align0
y_align0
backgroundfalse
background_size10
background_stroke2
background_stroke_colourblack
background_colourwhite
background_opacity100
edge_stylestraight

Most "burn text onto an image" nodes stop at font, color, and position. This one does that too, but it also gives the optional background box behind your text its own stroke, opacity, and a choice of eight edge treatments - straight, curved, rounded, wavy, zigzag, double line, dashed line, beveled - which is an unusual amount of depth for what's normally a one-line utility. Reach for it for captions, watermarks, title cards, or meme-style text over an image.

How it works

text and image are the two required pieces. Styling the letters themselves is font (ten system fonts by family name - DejaVu, Droid, Noto variants), font_size, fill_colour plus an outline via stroke_colour and stroke_thickness. Positioning is layered: horizontal_alignment / vertical_alignment set where the text block sits on the canvas, justification controls how multi-line text aligns within that block, padding keeps it off the edges, and x_align / y_align give you a fine pixel nudge on top of all of that. line_spacing and letter_spacing are your typography knobs.

background (off by default) turns on the box behind the text, and only then do background_size, background_stroke, background_stroke_colour, background_colour, background_opacity, and edge_style do anything - leave background off if you just want bare text and ignore that whole block.

The color picker itself is worth a specific mention: 30 named choices, and not just the basics - amethyst, diamond, emerald, gold, and lime sit alongside black, blue, and green. That's a noticeably wider palette than this pack's other image nodes (GR Stack Image and the Tile-and-Border nodes only offer seven basic colors), so don't expect the same dropdown shape across the pack.

The inputs and outputs that matter

  • text, image - required.
  • font, font_size, fill_colour, stroke_colour / stroke_thickness - the core letter styling most people will actually touch.
  • horizontal_alignment / vertical_alignment / justification - where the text sits and how it aligns.
  • background - off by default; flip this on before touching any of the background-box settings.

Three outputs: IMAGE (the composited result) and two outputs both literally named MASK, with nothing in the schema distinguishing them - most likely one is the text glyph mask and the other the background-box mask, but the safest move is to preview both and pick the one that's actually what you need rather than guessing from port order.

How to install it

ComfyUI Manager, search GraftingRayman. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/GraftingRayman/ComfyUI_GraftingRayman

Restart afterward. The pack fails to import entirely without OpenAI's CLIP installed separately, even though this node never touches CLIP - portable ComfyUI: .\python_embeded\python.exe -m pip install git+https://github.com/openai/CLIP.git; system Python: pip install git+https://github.com/openai/CLIP.git.

Common issues & troubleshooting

Pack fails to load. Check your startup console for the CLIP import error and run the pip install above.

Text renders in an unexpected font, or the font dropdown seems wrong. font is a system font by family name, and this pack assumes DejaVu/Droid/Noto are actually installed. A bare Docker image or an unusual environment may not have that font set, and the render will fall back to something you didn't choose.

Set background options but nothing changed. Check background is actually on - every one of background_size, background_stroke, background_colour, background_opacity, and edge_style is a no-op while it's off.

Not sure which MASK output to use. Preview both - the schema gives them identical names with no distinguishing label, so there's no shortcut past checking your actual output.

CategoryGraftingRayman/Overlays

Inputs (22)

NameTypeDefaultDescription
textSTRINGHello
fontCOMBODejaVu Sans10 options: DejaVu Sans, DejaVu Sans Bold, DejaVu Sans Mono, DejaVu Sans Mono Bold, DejaVu Serif, DejaVu Serif Bold, +4
font_sizeINT321–256
vertical_alignmentCOMBObottom3 options: top, middle, bottom
horizontal_alignmentCOMBOcenter3 options: left, center, right
justificationCOMBOleft3 options: left, center, right
paddingINT160–128
stroke_thicknessINT20–50
stroke_colourCOMBOblack30 options: amethyst, black, blue, cyan, diamond, emerald, +24
fill_colourCOMBOwhite30 options: amethyst, black, blue, cyan, diamond, emerald, +24
line_spacingFLOAT0.00-0.5–200
letter_spacingFLOAT0.00-0.5–200
x_alignINT0-128–128
y_alignINT0-128–128
backgroundBOOLEANfalse
background_sizeINT100–256
background_strokeINT20–50
background_stroke_colourCOMBOblack30 options: amethyst, black, blue, cyan, diamond, emerald, +24
background_colourCOMBOwhite30 options: amethyst, black, blue, cyan, diamond, emerald, +24
background_opacityINT1000–100
edge_styleCOMBOstraight8 options: straight, curved, rounded, wavy, zigzag, double_line, +2
imageIMAGE

Outputs (3)

NameTypeDescription
IMAGEIMAGE
MASKMASK
MASKMASK