Nodes/comfyui-AGSoft/🔤 AGSoft Text Overlay
ComfyUI Node

🔤 AGSoft Text Overlay

Burn a caption onto your render without ever leaving the graph

By Art-xmaster·Created 12 months ago·Updated a day ago· 23
🔤 AGSoft Text Overlay
  • image
  • mask
  • IMAGE
texttext
font_name
font_size50
font_colorwhite
text_opacity1.00
stroke_width0
stroke_colorblack
shadow_x0
shadow_y0
shadow_colorblack
box_padding20
box_colorblack
box_opacity0.50
box_radius20
align
justify
text_alignleft
margins0
line_spacing10
position_x0
position_y0
rotation_angle0.0
font_color_hex#FFFFFF
stroke_color_hex#000000
shadow_color_hex#000000
box_color_hex#000000

Every workflow eventually needs a caption burned onto an image - the settings you used, a watermark, subtitles for a video pass - and stock ComfyUI gives you nothing for it. 🔤 AGSoft Text Overlay from comfyui-AGSoft is the closest thing to a full text-layout engine inside the graph: fourteen bundled fonts, stroke, drop shadow, a rounded background box, rotation, and even mask-based positioning. WAS Node Suite has a text overlay too, but it's a toy next to this one.

How it works

Under the hood it's Pillow (ImageDraw) drawing on a temporary RGBA layer, then compositing over your image. The pack ships its fonts in a fonts/ directory inside the repo - everything from impact.ttf to RubikBeastly-Regular.ttf - so you don't download a thing. If a font file can't be loaded it silently falls back to Pillow's default font, which is worth remembering when your text suddenly looks like a terminal window.

The essentials a beginner actually sets:

  • text - multiline, so drop a whole paragraph in. Newlines become line breaks.
  • font_name / font_size - pick from the bundled list; size up to 1024.
  • font_color - a 30-color dropdown, or pick custom and fill in font_color_hex (same pattern for stroke, shadow, and box colors).
  • stroke_width / shadow_x / shadow_y - outline and drop-shadow controls. Default 0 means off.
  • box_padding, box_opacity, box_radius - the background box behind the text. Bump opacity and it becomes a caption bar.
  • align (vertical: center/top/bottom), justify (horizontal), text_align (inside the text block), margins, line_spacing, position_x / position_y for nudging, and rotation_angle in degrees.

That's a lot of knobs, but they're all zero-or-sane by default: the node centers your text and you nudge from there.

The mask trick

The killer feature is the optional mask input. Instead of hand-positioning, draw a mask with ComfyUI's built-in mask editor on an image node, feed it in, and the node computes the text area from the mask's bounding box - it centers the text inside whatever region you painted. For watermarking the bottom-right corner of a whole batch, you paint once and it just follows the region. Note that a connected mask overrides your margins, position, justify, and align; the mask defines the box.

Why you'd reach for it

  • Stamp the settings/prompt onto a render before posting it.
  • Add subtitles or title cards to an image sequence headed into a video workflow.
  • Batch-watermark an output directory with your handle and model name.

Installing and troubleshooting

Same as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
# restart ComfyUI

Or search comfyui-AGSoft in ComfyUI Manager. The overlay node needs Pillow, which ComfyUI already depends on, so no extra install beyond the pack itself.

The gotchas are all visual: if your "custom" color isn't applied, you probably left the dropdown on a preset instead of custom. If text looks wrong, check you're picking from the pack's bundled fonts rather than expecting your system's. And the mask overrides positioning - if you're fighting placement, disconnect the mask and check whether it's the culprit.

CategoryAGSoft/Text

Inputs (28)

NameTypeDefaultDescription
imageIMAGEThe input image to overlay text on. Входное изображение.
textSTRINGtextThe text to be overlaid. Текст.
font_nameCOMBOThe font file to use. Файл шрифта.
font_sizeINT501–1024Font size. Размер шрифта.
font_colorCOMBOwhiteText color. Цвет текста.
text_opacityFLOAT1.000–1Text opacity. Прозрачность текста.
stroke_widthINT00–20Stroke width. Ширина обводки.
stroke_colorCOMBOblackStroke color. Цвет обводки.
shadow_xINT0-100–100Shadow X offset. Смещение тени X.
shadow_yINT0-100–100Shadow Y offset. Смещение тени Y.
shadow_colorCOMBOblackShadow color. Цвет тени.
box_paddingINT200–200Box padding. Отступ фона.
box_colorCOMBOblackBox color. Цвет фона.
box_opacityFLOAT0.500–1Box opacity. Прозрачность фона.
box_radiusINT200–100Box corner radius. Радиус скругления.
alignCOMBOVertical alignment. Вертикальное выравнивание.
justifyCOMBOHorizontal alignment. Горизонтальное выравнивание.
text_alignCOMBOleftText alignment inside block. Выравнивание внутри блока.
marginsINT0-1024–1024Margins from edges. Отступы от краев.
line_spacingINT10-1024–1024Line spacing. Интервал между строк.
position_xINT0-4096–4096X position offset. Смещение X.
position_yINT0-4096–4096Y position offset. Смещение Y.
rotation_angleFLOAT0.0-360–360Rotation angle. Угол поворота.
maskoptMASKOptional mask to define text area. Draw it using ComfyUI's built-in mask editor on an image node. Опциональная маска для зоны текста. Нарисуйте её через встроенный редактор масок ComfyUI.
font_color_hexoptSTRING#FFFFFFCustom font HEX. Кастомный HEX шрифта.
stroke_color_hexoptSTRING#000000Custom stroke HEX. Кастомный HEX обводки.
shadow_color_hexoptSTRING#000000Custom shadow HEX. Кастомный HEX тени.
box_color_hexoptSTRING#000000Custom box HEX. Кастомный HEX фона.

Outputs (1)

NameTypeDescription
IMAGEIMAGE