What is the Mask Editor?

It's a tool for drawing a mask (a black-and-white image) over part of an image, right inside ComfyUI.

Besides making masks, it also has basic painting features.


How to Launch

  • Select a node such as Load Image → click 🌔 (Open Mask Editor) in the Node Selection Toolbox

Tools

Switch tools with the tabs on the far left.

    • If your browser's "Hardware Acceleration" is turned off, the editor may become sluggish.

Mask Drawing

Draw a mask with a brush.

  • Brush Shape: Shape of the brush
  • Thickness: Thickness of the brush
  • Opacity: Opacity
    • Masks in AI generation are usually treated as "white or black (0 or 1)", so you'll normally leave this at the maximum.
  • Hardness: Brush hardness (how soft the edge is)
  • Smoothing precision: Line correction strength

Paint

Paint colors onto the image. Useful as a guide for inpainting, for example.

  • Color Selector: Pick the paint color

Eraser

Erases masks and paint you've drawn.

You can also erase by right-clicking while in Mask or Paint mode.

Fill

Fills an area enclosed by a hand-drawn mask.

  • Tolerance: Tolerance range
    • If it's low, gaps get left behind, so it's better to turn it up.

Automatic Selection

This is the so-called "magic wand" tool.

It automatically masks the area with colors similar to where you clicked.

  • Tolerance: Color tolerance

Top Menu

  • Undo / Redo: Undo / redo
  • Clear: Clear all
  • Invert: Invert mask

Save and Apply

  • Click Save to node

Edits are applied to the node and the editor closes.