Nodes/ComfyUI-Mana-Nodes/πŸ–ΌοΈ Canvas Properties
ComfyUI Node

πŸ–ΌοΈ Canvas Properties

Canvas Properties

By ForeignGodsΒ·Created 2 years agoΒ·Updated 2 years agoΒ· 249
πŸ–ΌοΈ Canvas Properties
  • images
  • canvas
β—„height512β–Ί
β—„width512β–Ί
β—„background_colorblackβ–Ί
β—„text_alignmentcenter centerβ–Ί
β—„padding0β–Ί
β—„line_spacing5β–Ί

Canvas Properties is the "what am I drawing text onto" node in Mana Nodes. It defines the surface - size, background, alignment, spacing - and hands that config to the Text to Image Generator. Where Font Properties describes the text, this describes the page the text sits on.

Why you'd reach for it

The generator needs to know two things before it can render: how the text should look (Font Properties) and where it lives (Canvas Properties). This is the second half. It's also where you decide whether your text sits on a flat color or is burned over an existing video - because the background can be an image sequence, not just a solid fill.

The inputs that matter

Short list, and a beginner sets maybe three of them:

  • width / height - canvas dimensions, default 512Γ—512. Match these to whatever you're overlaying onto, or to your intended video size.
  • background_color - default black. Takes CSS color keywords. Ignored if you feed the optional images input (see below).
  • text_alignment - a 3Γ—3 grid of options: left top through right bottom, default center center. This is where on the canvas the text block anchors.

Then two spacing controls: padding, the margin between the text and the canvas edge, and line_spacing, the gap between wrapped lines.

The one optional input is the interesting one: images. Wire an image batch in here and the text renders over those frames instead of over background_color. That's how you put captions on top of an AnimateDiff loop or a video you split into frames - feed the frames into the canvas, feed the canvas into the generator, and the text is composited on top.

The single output is canvas (type CANVAS_SETTINGS), which plugs into the canvas slot of a Text to Image Generator.

Installing it

It's part of the Mana Nodes pack. ComfyUI Manager β†’ search Mana Nodes β†’ install β†’ restart. Or clone:

cd ComfyUI/custom_nodes
git clone https://github.com/ForeignGods/ComfyUI-Mana-Nodes.git

Install the requirements (pip install -r requirements.txt in your venv, or the python_embed variant on the Windows portable build) and restart. No model downloads - this node is pure layout config built on Pillow.

Common issues

The most common surprise is frame-count mismatch. When you feed an image sequence into images, that sequence has some number of frames, and the generator has its own frame_count. If they disagree, your background and your text animation run for different lengths - line them up. If you set a lovely background_color and it never shows, check whether you've got something connected to images; the image input wins and the color is ignored.

Alignment confusion is the other one: text_alignment positions the whole text block, but per-character nudging (x_offset, y_offset) lives over on the Font Properties node. If your text is "off center" in a way alignment won't fix, look at the offsets there. Keep the canvas dimensions consistent with your downstream video size and you'll avoid letterboxing or cropped captions.

CategoryπŸ’  Mana Nodes/βš™οΈ Generator Settings

Inputs (7)

NameTypeDefaultDescription
heightINT512β€”
widthINT512β€”
background_colorSTRINGblackβ€”
text_alignmentCOMBOcenter center9 options: left top, left center, left bottom, center top, center center, center bottom, +3
paddingINT0β€”
line_spacingINT5β€”
imagesoptIMAGEβ€”

Outputs (1)

NameTypeDescription
canvasCANVAS_SETTINGSβ€”