mask
Image to Mask

Convert Image to Mask

comfyUI节点-Convert Image to Mask|图像到遮罩

Documentation

  • Class name: ImageToMask
  • Category: mask
  • Output node: False

The ImageToMask node is designed to convert an image into a mask based on a specified color channel. It allows for the extraction of mask layers corresponding to the red, green, blue, or alpha channels of an image, facilitating operations that require channel-specific masking or processing.

Input types

ParameterComfy dtypeDescription
imageIMAGEThe 'image' parameter represents the input image from which a mask will be generated based on the specified color channel. It plays a crucial role in determining the content and characteristics of the resulting mask.
channelCOMBO[STRING]The 'channel' parameter specifies which color channel (red, green, blue, or alpha) of the input image should be used to generate the mask. This choice directly influences the mask's appearance and which parts of the image are highlighted or masked out.

Output types

ParameterComfy dtypeDescription
maskMASKThe output 'mask' is a binary or grayscale representation of the specified color channel from the input image, useful for further image processing or masking operations.