Current location: Home> ComfyUI Tutorial> Mask Editor - ComfyUI Settings Menu

Mask Editor - ComfyUI Settings Menu

Author: LoRA Time: 27 Mar 2025

Mask Editor - ComfyUI Mask Editor usage and setting tutorial

This article will cover

What is a mask

Mask Editor in the Settings menu

Use of mask editing in ComfyUI

What is a mask

Imagine that we have a piece of black paper on hand. When we buckle out some holes in this paper and cover it with this paper on a photo, only the holes will show the content below. The mask on the computer is like this black paper. Black is the place blocked by the mask and will not be displayed. White is like a hole on the paper, which can make the part below display. We can use the mask to select the specific part we need in the image. You can understand the translucent area as a transition area.

Similar to this picture, we use black to identify the part we need to select, while white is unselected. Of course, you can reverse the color of the mask by inverting the mask to reverse the color.

Mask Editor Settings Menu

Brush adjustment

Lock the brush adjustment to the spindle: When enabled, the brush adjustment will affect the size or hardness only depending on the direction you move.

Brush Adjustment Speed ​​Multiplier: Controls the speed at which the brush size and hardness change during adjustment. Higher values ​​mean faster changes.

New Editor

Use the new brush editor: When enabled, the new version of the mask mask editor will be used

The new version is enabled by default, the new version of the UI interface is clearer and easier to use

How to open the Mask Editor of ComfyUI

In ComfyUI, mask editing is mainly used to edit image masks, which are usually required in Inpainting's workflow.

Refer to the picture below. When you load an image on the Load image node, you can right-click on the node to select Open in MaskEditor so that you can open the mask editor. The corresponding mask editing output will be output on the corresponding node's Mask

ComfyUI Mask Editor Operation Interface Description

The mask editor is mainly divided into three parts

1. The top operation menu

Undo and redo

b1: Invert Inversion Mask (Black and White Color Inversion)

b2: Clear Clear all drawn mask masks

b3: Save Save editing of mask mask and exit Mask Editor

b4: Cancel Cancel the current edit and exit the Mask Editor

2. The tool selection menu on the left

a1: Brush Tool (Brush) - Drawing Mask Mask

a2: Eraser Tool - Erase the mask that has been drawn

a3: Paint Bucket Tool - Quickly add masks to the area

a4: Color Select: Quickly add similar colors to masks

3. Tool menu for the corresponding tool on the right

Use of Brush Tool

After selecting the brush tool for masking, you can apply the area you need to select on the image. The corresponding brush tool settings are as follows

ComfyUI Brush Setting

Brush Shape: round or square

Brush width (Thickness): brush size

Opacity: The transparency of the area drawn by the brush, the smaller the area, the more transparent it is.

Hardness: The hardness of the brush, the edges drawn when the hardness is small, and the edges are sharp when the hardness is large.

Smoothing Precision: Draw the continuity of the trajectory

Use of Eraser Tool

After selecting, remove the unwanted area in the mask area.

The settings options of the Eraser Tool are the same as those of the Brush Tool

Use of paint bucket tools (Buckets)

The paint bucket tool is mainly used to quickly fill closed areas. You need to have closed areas on the current mask before you can use the paint bucket tool. Please refer to the video. Here is an example of a quick fill area.

Tolerance: The greater the tolerance, the less obvious the gap between the fill area and the closed edge. It sets a threshold size to identify the fill area.

Use of Color Select

The color straw tool is mainly suitable for operations that want to quickly add some similar colors to the mask. It is especially suitable for some solid color pictures or the corresponding options for material partition diagrams made using Segment anything.

Tolerance: Determines how many similar colors are added to the mask area. The larger the color, the more similar colors are added.

Live Preview: After you have absorbed some colors using the straw tool, enable this option to change the tolerance level and you can see the corresponding range changes in real time.

Whether to sample the whole image (Apply to whole Image): If not enabled, only similar colors near the area you clicked will be selected. If enabled, similar colors of the entire image will be sampled.

Color sampling method: Simple, hsl, lab

Stop at mask: To be supplemented

Mask Tolerance: To be supplemented

Please refer to the video below for the corresponding operation