Skip to main content
The Mask Editor is a built-in tool in ComfyUI that lets you create and edit masks directly on your images — no external image editor needed. It supports multiple drawing tools, layer management, undo/redo, canvas transformations, and GPU-accelerated brush rendering.

How to Open

There are three ways to open the Mask Editor:
  1. Selection Toolbox — Select a Load Image node, then click the Mask icon button in the selection toolbar above the node.
  2. Image Overlay — Hover over the image preview (gallery mode), then click the Edit or mask image button (mask icon) that appears in the top-left corner.
  3. Right-Click Menu — Right-click a Load Image node and select Open in Mask Editor from the context menu.
The Mask Editor is available in both Graph Mode and App Mode.
Three ways to open the Mask Editor: Selection Toolbox, Image Overlay, and Right-Click Menu

Interface Overview

Mask Editor main interface with tool panel, canvas, and settings side panel The Mask Editor opens as a modal dialog with four main areas:

Tools

The tool panel on the left side offers five tools. Select a tool to activate it, and the right panel will show its settings. Mask Editor tool panel with 5 numbered tools

TopBar Actions

Mask Editor TopBar actions labeled 1–10 The top bar provides canvas-wide operations:
Note: Rotate and mirror operations affect all three layers (mask, paint, and base image) simultaneously. GPU-accelerated textures are recreated after transforms.

Layers

The right panel includes a Layers section where you can toggle visibility of each layer independently:
  • Mask Layer: The mask overlay. You can adjust its opacity and blending mode:
    • Black — Mask renders as black overlay
    • White — Mask renders as white overlay
    • Negative — Inverted mask rendering
  • Paint Layer: The RGB paint layer (visible when using Paint Pen)
  • Base Image Layer: The original source image
Click Activate Layer on a layer to switch drawing focus to it. Refer to the main editor screenshot above — the right panel includes brush settings and the Layers section at the bottom.

Brush Settings

When a brush-based tool (Mask Pen, Paint Pen, or Eraser) is active, the side panel shows brush settings: Use Reset to Default to restore the default brush parameters.

Canvas Navigation & Shortcuts


Settings

In the ComfyUI Settings panel, you can configure the following Mask Editor options:

Video Tutorial

Note: This video demonstrates an older version of the Mask Editor (Nodes 1.0 UI) showing brush size adjustment and mask preview creation. The overall workflow remains the same in the current version.