Use this file to discover all available pages before exploring further.
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.
The tool panel on the left side offers five tools. Select a tool to activate it, and the right panel will show its settings.
#
Tool
Layer
Description
1
Mask Pen
Mask
Primary tool for drawing mask regions. Left-click and drag to paint mask on the image.
2
Paint Pen
RGB (Paint)
Paint directly onto the image’s RGB layer. Useful for inpainting or touching up the base image.
3
Eraser
Mask / RGB
Erase parts of an existing mask or paint layer.
4
Paint Bucket
Mask
Flood-fill tool based on color similarity. Click a pixel to fill the connected region with a mask; click an already-masked area to erase from the mask. Tolerance controls how broadly the fill spreads.
5
Color Select
Mask
Selectively mask all pixels matching a target color, with advanced matching algorithms (Simple HSL / LAB).
Note: Rotate and mirror operations affect all three layers (mask, paint, and base image) simultaneously. GPU-accelerated textures are recreated after transforms.
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.
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.