ComfyUI > Nodes > ComfyUI-JakeUpgrade > Mask Input Switch JKšŸ‰

ComfyUI Node: Mask Input Switch JKšŸ‰

Class Name

CR Mask Input Switch JK

Category
šŸ‰ JK/šŸ”€ Logic
Author
jakechai (Account age: 1902days)
Extension
ComfyUI-JakeUpgrade
Latest Updated
2025-05-20
Github Stars
0.08K

How to Install ComfyUI-JakeUpgrade

Install this extension via the ComfyUI Manager by searching for ComfyUI-JakeUpgrade
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-JakeUpgrade 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

Mask Input Switch JKšŸ‰ Description

Facilitates conditional mask selection based on boolean input for AI art workflows.

Mask Input Switch JKšŸ‰:

The CR Mask Input Switch JK node is designed to facilitate conditional logic within your AI art workflows by dynamically selecting between two different mask inputs based on a boolean value. This node is particularly useful when you need to apply different masks to your artwork depending on specific conditions or criteria. By leveraging this node, you can streamline your workflow, making it more efficient and adaptable to various scenarios without the need for manual intervention. The primary function of this node is to evaluate a boolean input and return one of the two provided masks accordingly, ensuring that the appropriate mask is applied based on the given condition.

Mask Input Switch JKšŸ‰ Input Parameters:

boolean_value

The boolean_value parameter is a boolean input that determines which mask will be selected. If set to True, the node will output the mask_true input; if set to False, it will output the mask_false input. This parameter is essential for controlling the conditional logic of the node. The default value is False.

mask_false

The mask_false parameter is the mask input that will be selected and output by the node when the boolean_value is False. This parameter allows you to define the mask that should be used under the false condition. There are no specific minimum or maximum values for this parameter as it is a mask input.

mask_true

The mask_true parameter is the mask input that will be selected and output by the node when the boolean_value is True. This parameter allows you to define the mask that should be used under the true condition. Similar to mask_false, there are no specific minimum or maximum values for this parameter as it is a mask input.

Mask Input Switch JKšŸ‰ Output Parameters:

MASK

The MASK output is the selected mask based on the evaluation of the boolean_value parameter. If boolean_value is True, the mask_true input is returned; if boolean_value is False, the mask_false input is returned. This output is crucial for applying the correct mask to your artwork based on the specified condition.

BOOLEAN

The BOOLEAN output is the same as the input boolean_value. It is returned to provide confirmation of the condition that was evaluated, ensuring transparency and traceability in your workflow.

Mask Input Switch JKšŸ‰ Usage Tips:

  • Use the boolean_value parameter to control the application of different masks dynamically, allowing for more flexible and adaptive workflows.
  • Ensure that both mask_false and mask_true inputs are properly defined and relevant to your specific use case to avoid unexpected results.

Mask Input Switch JKšŸ‰ Common Errors and Solutions:

"Invalid mask input"

  • Explanation: This error occurs when the provided mask inputs (mask_false or mask_true) are not valid or properly defined.
  • Solution: Verify that both mask_false and mask_true inputs are correctly specified and are valid mask types.

"Boolean value not provided"

  • Explanation: This error occurs when the boolean_value parameter is not provided or is missing.
  • Solution: Ensure that the boolean_value parameter is included and correctly set to either True or False.

"Unexpected output type"

  • Explanation: This error occurs when the output type does not match the expected MASK or BOOLEAN types.
  • Solution: Check the node configuration and ensure that the inputs and outputs are correctly defined and compatible with the expected types.

Mask Input Switch JKšŸ‰ Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-JakeUpgrade
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 Playground, enabling artists to harness the latest AI tools to create incredible art.