ComfyUI > Nodes > ComfyUI-CRZnodes > CRZ Switch

ComfyUI Node: CRZ Switch

Class Name

CRZSwitch

Category
CRZ
Author
CoreyCorza (Account age: 2722days)
Extension
ComfyUI-CRZnodes
Latest Updated
2025-09-09
Github Stars
0.04K

How to Install ComfyUI-CRZnodes

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

CRZ Switch Description

Versatile node for conditional logic, choosing between inputs based on boolean condition in AI art workflows.

CRZ Switch:

The CRZ Switch node is a versatile component designed to facilitate conditional logic within your AI art workflows. Its primary function is to allow you to choose between two different inputs based on a boolean condition, effectively acting as a decision-making tool within your node-based environment. This node is particularly beneficial when you need to dynamically alter the flow of data or operations based on specific conditions, enabling more complex and adaptive workflows. By leveraging the CRZ Switch, you can streamline processes, reduce redundancy, and enhance the flexibility of your creative projects.

CRZ Switch Input Parameters:

false_input

The false_input parameter represents the data or operation that will be selected if the boolean condition is evaluated as false. This input is designed to be lazy, meaning it will only be evaluated if it is actually needed, which can help optimize performance by avoiding unnecessary computations. There are no specific type restrictions for this input, allowing it to accept any data type, making it highly adaptable to various use cases.

true_input

The true_input parameter is the counterpart to false_input and is selected when the boolean condition is true. Like false_input, this parameter is also lazy and can accept any data type, providing the same level of flexibility and efficiency. This allows you to define alternative data paths or operations that should be executed when the condition is met.

value

The value parameter is a boolean that determines which input will be selected. If set to true, the true_input is chosen; otherwise, the false_input is used. This parameter is crucial as it controls the decision-making process of the node. The default value is false, and it does not require forced input, allowing for seamless integration into various workflows.

CRZ Switch Output Parameters:

output

The output parameter is the result of the switch operation, providing the selected input based on the boolean condition. This output can be of any data type, reflecting the flexibility of the inputs. The output is essential as it represents the data or operation that will continue through the workflow, enabling dynamic and conditional processing within your projects.

CRZ Switch Usage Tips:

  • Utilize the CRZ Switch node to create conditional branches in your workflow, allowing for more dynamic and responsive processes based on specific criteria.
  • Take advantage of the lazy evaluation feature to optimize performance by ensuring that only the necessary inputs are computed, reducing unnecessary processing.

CRZ Switch Common Errors and Solutions:

Missing Input Error

  • Explanation: This error occurs when one or both of the inputs (false_input or true_input) are not provided, leading to an incomplete configuration.
  • Solution: Ensure that both false_input and true_input are connected to valid data sources or operations to avoid this error.

Invalid Boolean Value

  • Explanation: This error arises when the value parameter is not a valid boolean, which can disrupt the decision-making process of the node.
  • Solution: Verify that the value parameter is correctly set to either true or false to ensure proper functionality of the switch operation.

CRZ Switch Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-CRZnodes
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.