Visit ComfyUI Online for ready-to-use ComfyUI environment
Streamline mask selection in AI art projects with dynamic switching between up to five inputs based on selection parameter.
The Mask Switch (JPS) node is designed to streamline the process of selecting and switching between multiple mask inputs in your AI art projects. This node allows you to dynamically choose from up to five different mask inputs based on a selection parameter, making it easier to manage and apply different masks without manually changing the input each time. This functionality is particularly useful in scenarios where you need to experiment with various masking options or automate the selection process based on specific conditions. By using the Mask Switch (JPS) node, you can enhance your workflow efficiency and maintain a more organized project structure.
The select
parameter is an integer that determines which mask input will be used as the output. It accepts values from 1 to 5, where each number corresponds to one of the optional mask inputs (mask_1
to mask_5
). For example, if select
is set to 1, the node will output mask_1
. This parameter is required and does not have a default value.
The mask_1
parameter is an optional input that accepts a mask. This mask will be selected as the output if the select
parameter is set to 1. If not provided, the output will be None
when select
is 1.
The mask_2
parameter is an optional input that accepts a mask. This mask will be selected as the output if the select
parameter is set to 2. If not provided, the output will be None
when select
is 2.
The mask_3
parameter is an optional input that accepts a mask. This mask will be selected as the output if the select
parameter is set to 3. If not provided, the output will be None
when select
is 3.
The mask_4
parameter is an optional input that accepts a mask. This mask will be selected as the output if the select
parameter is set to 4. If not provided, the output will be None
when select
is 4.
The mask_5
parameter is an optional input that accepts a mask. This mask will be selected as the output if the select
parameter is set to 5. If not provided, the output will be None
when select
is 5.
The mask_out
parameter is the output mask selected based on the value of the select
parameter. It will be one of the masks provided in mask_1
to mask_5
, or None
if the corresponding mask input is not provided. This output is crucial for applying the selected mask to subsequent nodes in your workflow, enabling dynamic and flexible mask management.
mask_1
to mask_5
) even if you plan to use only a few. This will allow you to switch between different masks seamlessly.select
parameter dynamically by connecting it to other nodes or scripts that can change its value based on specific conditions or user inputs, thereby automating the mask selection process.select
parameter value is outside the valid range of 1 to 5. - Solution: Ensure that the select
parameter is set to an integer between 1 and 5.None
because it was not provided.select
parameter value is provided and not None
.© Copyright 2024 RunComfy. All Rights Reserved.