Visit ComfyUI Online for ready-to-use ComfyUI environment
Switch between image and mask inputs based on selection parameter, streamlining conditional image manipulation for AI artists.
The ImageMaskSwitch
node is designed to provide a flexible way to switch between multiple image and mask inputs based on a selection parameter. This node is particularly useful when you have several image-mask pairs and need to dynamically choose which pair to use in your workflow. By allowing you to select from up to four different image-mask pairs, this node helps streamline processes that require conditional image manipulation or analysis, making it a valuable tool for AI artists who work with complex image compositions and need to manage multiple layers or variations efficiently.
The select
parameter determines which image-mask pair to use. It is an integer value with a default of 1, a minimum of 1, and a maximum of 4. This parameter is crucial as it directs the node to output the corresponding image and mask based on the selected number. For example, if select
is set to 2, the node will output images2_opt
and mask2_opt
.
The images1
parameter is the primary image input and is required. This is the image that will be used when the select
parameter is set to 1. It serves as the default image input and is essential for the node's operation.
The mask1_opt
parameter is an optional mask input associated with images1
. If provided, this mask will be used when the select
parameter is set to 1. This allows for additional image processing or analysis based on the mask.
The images2_opt
parameter is an optional image input. This image will be used when the select
parameter is set to 2. It provides flexibility to switch to a different image based on the selection.
The mask2_opt
parameter is an optional mask input associated with images2_opt
. If provided, this mask will be used when the select
parameter is set to 2, enabling conditional image processing.
The images3_opt
parameter is an optional image input. This image will be used when the select
parameter is set to 3. It allows for further flexibility in choosing different images.
The mask3_opt
parameter is an optional mask input associated with images3_opt
. If provided, this mask will be used when the select
parameter is set to 3, facilitating additional image manipulation options.
The images4_opt
parameter is an optional image input. This image will be used when the select
parameter is set to 4. It offers the maximum flexibility by allowing up to four different image inputs.
The mask4_opt
parameter is an optional mask input associated with images4_opt
. If provided, this mask will be used when the select
parameter is set to 4, enabling comprehensive image processing capabilities.
The IMAGE
output is the selected image based on the select
parameter. This output is crucial as it provides the image that will be used in subsequent nodes or processes. The selected image can be one of the four optional images or the primary image.
The MASK
output is the selected mask based on the select
parameter. This output is important for workflows that require mask-based image processing or analysis. The selected mask can be one of the four optional masks or the primary mask.
select
parameter is set correctly to choose the desired image-mask pair. This will help avoid confusion and ensure the correct outputs are used in your workflow.select
parameter is set to a value outside the allowed range (1-4).select
parameter is set to an integer value between 1 and 4.images1
is not provided.images1
input, as it is required for the node to function.select
parameter points to an optional image or mask input that is not provided.select
value are provided, or adjust the select
parameter to point to available inputs.© Copyright 2024 RunComfy. All Rights Reserved.