ComfyUI > Nodes > ComfyUI 1hewNodes > Any Switch Bool

ComfyUI Node: Any Switch Bool

Class Name

1hew_AnySwitchBool

Category
1hewNodes/logic
Author
1hew (Account age: 1113days)
Extension
ComfyUI 1hewNodes
Latest Updated
2026-04-17
Github Stars
0.03K

How to Install ComfyUI 1hewNodes

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

Any Switch Bool Description

The node enables conditional logic in AI art workflows by switching outputs based on a boolean.

Any Switch Bool:

The 1hew_AnySwitchBool node is designed to facilitate conditional logic within your AI art workflows by allowing you to switch between two potential outputs based on a boolean input. This node acts as a decision-making tool, where you can define two different paths or actions, and the node will execute one of them depending on whether the boolean condition is true or false. This capability is particularly useful for creating dynamic and responsive workflows that can adapt to different conditions or inputs, enhancing the flexibility and interactivity of your AI art projects.

Any Switch Bool Input Parameters:

boolean

The boolean parameter is a critical input that determines which of the two potential outputs will be executed. It accepts a boolean value, which can be either True or False. When set to True, the node will execute the action or path defined in the on_true input. Conversely, if set to False, it will execute the action or path defined in the on_false input. The default value for this parameter is True, meaning that if no specific input is provided, the node will default to executing the on_true path.

on_true

The on_true parameter is an optional input that specifies the action or path to be executed when the boolean parameter is True. This input is designed to be flexible, allowing you to define any custom action or data that should be processed when the condition is met. It is marked as lazy, meaning it will only be evaluated if the boolean condition is True, optimizing performance by avoiding unnecessary computations.

on_false

The on_false parameter is an optional input that specifies the action or path to be executed when the boolean parameter is False. Similar to on_true, this input is also flexible and can accommodate any custom action or data that should be processed when the condition is not met. It is also marked as lazy, ensuring that it is only evaluated if the boolean condition is False, thus enhancing efficiency by preventing unnecessary processing.

Any Switch Bool Output Parameters:

output

The output parameter is the result of the node's execution, determined by the value of the boolean input. If the boolean is True, the output will be the result of the on_true input. If the boolean is False, the output will be the result of the on_false input. This output is crucial as it represents the chosen path or action based on the conditional logic, allowing for dynamic and adaptable workflows in your AI art projects.

Any Switch Bool Usage Tips:

  • Use the 1hew_AnySwitchBool node to create conditional branches in your workflow, allowing for different actions based on specific conditions.
  • Ensure that the on_true and on_false inputs are properly configured to handle the expected data or actions, as this will determine the effectiveness of the node in executing the desired logic.

Any Switch Bool Common Errors and Solutions:

AnySwitchBool error: <error_message>

  • Explanation: This error occurs when there is an issue with executing the node, possibly due to incorrect or missing inputs.
  • Solution: Verify that both on_true and on_false inputs are correctly configured and that the boolean input is set to a valid boolean value. Ensure that any custom actions or data provided to these inputs are compatible with the expected output.

Any Switch Bool Related Nodes

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

Any Switch Bool