ComfyUI > Nodes > Basic data handling > load MASK from greyscale/red

ComfyUI Node: load MASK from greyscale/red

Class Name

Basic data handling: PathLoadMaskFromGreyscale

Category
Basic/Path
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

Install this extension via the ComfyUI Manager by searching for Basic data handling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Basic data handling in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

load MASK from greyscale/red Description

Extracts a mask from a greyscale image or RGB red channel, with optional mask inversion.

load MASK from greyscale/red:

The PathLoadMaskFromGreyscale node is designed to facilitate the extraction of a mask from a greyscale image or the red channel of an RGB image. This node is particularly useful for AI artists who need to create masks for image processing tasks, such as segmentation or compositing. By loading an image from a specified file path, the node processes the image to generate a mask based on the intensity values of a greyscale image or the red channel of an RGB image. This functionality allows for a straightforward conversion of image data into a mask format that can be used in various creative workflows. The node also offers an option to invert the mask, providing flexibility in how the mask is applied in subsequent processing steps.

load MASK from greyscale/red Input Parameters:

path

The path parameter specifies the file path to the image from which the mask will be extracted. This parameter is crucial as it directs the node to the correct image file. The path should be a string representing the location of the image on your system. There is no explicit minimum or maximum value for this parameter, but it must be a valid file path. The default value is an empty string, indicating that no path is set initially.

invert

The invert parameter is a boolean option that determines whether the generated mask should be inverted. When set to True, the mask values are inverted, meaning that areas that were originally white (or high intensity) become black (or low intensity), and vice versa. This can be useful when the desired mask effect requires the opposite of the default extraction. The default value is False, meaning the mask is not inverted by default.

load MASK from greyscale/red Output Parameters:

mask

The mask output is a tensor representing the extracted mask from the image. This mask is derived from the greyscale intensity values or the red channel of the image, depending on the image type. The mask is crucial for tasks that require distinguishing between different regions of an image, such as applying effects or isolating subjects.

exists

The exists output is a boolean value indicating whether the mask was successfully created. A value of True means the mask was generated without issues, while False indicates that the image could not be loaded or processed, resulting in an empty mask.

load MASK from greyscale/red Usage Tips:

  • Ensure that the file path provided in the path parameter is correct and points to a valid image file to avoid errors in mask generation.
  • Use the invert parameter to adjust the mask according to your specific needs, especially if the default mask extraction does not align with your intended use.

load MASK from greyscale/red Common Errors and Solutions:

Image file not found

  • Explanation: The specified file path does not point to an existing image file.
  • Solution: Verify that the file path is correct and that the image file exists at the specified location.

Unsupported image format

  • Explanation: The image format is not supported for mask extraction.
  • Solution: Convert the image to a supported format, such as greyscale or RGB, before using the node.

Empty mask returned

  • Explanation: The image could not be loaded, resulting in an empty mask.
  • Solution: Check the file path and ensure the image is accessible and in a compatible format.

load MASK from greyscale/red Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

load MASK from greyscale/red