Visit ComfyUI Online for ready-to-use ComfyUI environment
Node loads image, extracts channel for mask with switch control for conditional processing in image pipeline.
The LoadImageMaskWithSwitch
node is designed to load an image and extract a specific channel (red, green, blue, or alpha) to create a mask. This node includes a switch functionality that allows you to enable or disable the loading process. When enabled, it processes the image and extracts the desired channel to generate a mask. When disabled, it bypasses the loading process, returning no mask. This feature is particularly useful for workflows where conditional processing is required, providing flexibility and control over the image processing pipeline.
This parameter allows you to select the image file you want to process. The image can be uploaded directly, and the node will list available files from the input directory. The selected image will be used to extract the specified channel to create a mask.
This parameter specifies which color channel to extract from the image to create the mask. The available options are "red", "green", "blue", and "alpha". Selecting the appropriate channel is crucial for achieving the desired mask effect based on the image's content.
This optional boolean parameter controls whether the node should process the image or not. When set to True
(default), the node will load the image and extract the specified channel. When set to False
, the node will skip the processing and return no mask. This switch is useful for conditional workflows where you may want to enable or disable certain processing steps dynamically.
This output parameter provides the mask generated from the specified channel of the input image. The mask is a binary or grayscale image representing the intensity of the selected channel. This output is only available when the enabled
parameter is set to True
.
This output parameter returns the state of the enabled
input parameter. It indicates whether the node was active or bypassed during the execution. This can be useful for debugging or for downstream nodes to understand the processing flow.
enabled
parameter to conditionally control the processing flow, which can be particularly useful in complex workflows where certain steps need to be dynamically enabled or disabled.<image>
enabled
parameter is set to False
, causing the node to bypass the image loading and mask generation process.enabled
parameter and set it to True
if you want the node to process the image and generate a mask.© Copyright 2024 RunComfy. All Rights Reserved.