ComfyUI > Nodes > ComfyUI-CRZnodes > CRZ Execute Switch

ComfyUI Node: CRZ Execute Switch

Class Name

CRZExecuteSwitch

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 Execute Switch Description

Facilitates conditional execution in node-based workflows, directing data flow based on boolean conditions.

CRZ Execute Switch:

The CRZ Execute Switch node is designed to facilitate conditional execution within a node-based workflow, allowing you to direct the flow of data based on a boolean condition. This node is particularly useful when you need to decide between two paths of execution, effectively acting as a gatekeeper that routes input data to one of two outputs depending on the specified condition. By leveraging this node, you can streamline your workflow, ensuring that only the relevant branch of execution is processed, which can enhance efficiency and reduce unnecessary computations. The node employs an ExecutionBlocker to prevent the execution of the inactive branch, ensuring that resources are not wasted on processing paths that are not needed.

CRZ Execute Switch Input Parameters:

input

The input parameter accepts any type of data and serves as the primary data input for the node. This parameter is routed to one of the two outputs based on the boolean condition specified by the bool parameter. There are no specific minimum or maximum values for this parameter, as it is designed to handle any data type. The default value is None, indicating that no data is provided initially.

bool

The bool parameter is a boolean input that determines the routing of the input data. When set to True, the input data is directed to the true output, while the false output is blocked. Conversely, when set to False, the input data is directed to the false output, and the true output is blocked. This parameter does not have a range of values, as it is strictly a boolean type. The default value is False, meaning that, by default, the input data will be routed to the false output.

CRZ Execute Switch Output Parameters:

true

The true output parameter receives the input data when the bool parameter is set to True. This output is significant as it represents the active path of execution when the condition is met. If the bool parameter is False, this output is blocked using an ExecutionBlocker, preventing any data from being processed through this path.

false

The false output parameter receives the input data when the bool parameter is set to False. This output is crucial for scenarios where the condition is not met, and the alternative path of execution is required. If the bool parameter is True, this output is blocked using an ExecutionBlocker, ensuring that no data is processed through this path.

CRZ Execute Switch Usage Tips:

  • Use the CRZExecuteSwitch node to manage complex workflows where conditional logic is required, allowing you to efficiently direct data flow based on specific conditions.
  • Ensure that the bool parameter is correctly set to reflect the desired condition for routing the input data, as this will determine which output path is activated.

CRZ Execute Switch Common Errors and Solutions:

ImportError: No module named 'comfy_execution.graph'

  • Explanation: This error occurs when the ExecutionBlocker module is not available in your environment, which is used to block the inactive output path.
  • Solution: Ensure that the comfy_execution package is correctly installed and accessible in your environment. If the package is unavailable, consider updating your environment or using the fallback mechanism provided by the node, which does not rely on ExecutionBlocker.

NoneType object is not callable

  • Explanation: This error might occur if the input data is not properly initialized or if there is an issue with the data type being passed to the node.
  • Solution: Verify that the input data is correctly set and that it matches the expected data type. Ensure that the input parameter is not None unless intentionally left as such.

CRZ Execute 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.