Skip to content

Mask Paint

Node icon
Mask

Paint masks freehand with a brush. Quick and intuitive for organic selections.

Mask Paint lets you paint a mask directly by hand. The Brush tool paints white (adds to mask), and the Eraser paints black (removes from mask). Brush size, hardness, and opacity are all adjustable.

Mask Paint accepts two optional inputs: an image (for dimensions, overlay display, and alpha extraction) and a mask (for direct mask combination). When either input is connected, a combine mode selector appears. Connect the mask pin directly to combine with another mask node’s output (labeled “Input Mask”), or connect just an image to combine with its alpha channel (labeled “Input Alpha”). Combine modes include Replace (default), Union (add together), Subtract (remove from input), Intersect (keep overlap), and Difference. Without any input, you start with a blank canvas. The global invert toggle flips the entire output.

Output

Width pxInteger
Default: 1024 Range: 1–8192

Canvas width (used when no image connected)

Height pxInteger
Default: 1024 Range: 1–8192

Canvas height (used when no image connected)

Strokes

StrokesData
Default: []

Recorded brush stroke data

Global

Input AlphaChoice
Default: Replace

How painted strokes combine with input image alpha

  • ReplacePainted strokes replace the input mask entirely.
  • UnionAdd painted regions to the input mask — white wherever either is white.
  • SubtractRemove painted regions from the input mask.
  • IntersectKeep only the overlap between painted strokes and the input mask.
  • DifferenceKeep non-overlapping areas between painted strokes and the input mask.
InvertToggle
Default: false

Invert the final mask output

UI

Active ToolInteger
Default: 0 Range: 0–1

Brush (paint white) / Eraser (paint black)

Brush SizeNumber
Default: 20.0 Range: 1.0–500.0

Brush diameter in pixels

Brush HardnessNumber
Default: 1.0 Range: 0.0–1.0

Edge falloff; 0=soft, 1=hard

Brush OpacityNumber
Default: 1.0 Range: 0.0–1.0

Stroke opacity

Show SourceToggle
Default: true

Show source image behind mask in preview

Notes

Pins: image (optional IMAGE, for dimensions + overlay + alpha extraction), mask input (optional MASK, for direct mask combination — overrides alpha from image), mask output (MASK). The Input Alpha combo is shown when either input is connected; label shows "Input Mask" when the mask pin is connected, "Input Alpha" when only the image pin is connected.

  • Use a soft brush (low hardness) for gradual, feathered selections.
  • Reduce opacity to build up mask density gradually with multiple strokes.
  • Paint on top of an AI-generated mask to fix edges that need manual correction.
  • Use Union mode to add painted regions to an existing mask, or Subtract to carve out areas from it.
  • Connect a mask input directly to combine with another mask node’s output, or connect an image to work with its alpha channel.