ComfyUI > Nodes > Comfyui_LG_Tools > šŸŽˆLazySwitch2way

ComfyUI Node: šŸŽˆLazySwitch2way

Class Name

LazySwitch2way

Category
šŸŽˆLAOGOU/Switch
Author
LAOGOU-666 (Account age: 442days)
Extension
Comfyui_LG_Tools
Latest Updated
2025-06-06
Github Stars
0.08K

How to Install Comfyui_LG_Tools

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

šŸŽˆLazySwitch2way Description

Facilitates conditional logic with two output sets based on boolean condition for adaptive workflows.

šŸŽˆLazySwitch2way:

The LazySwitch2way node is designed to facilitate conditional logic within a node-based workflow, allowing you to dynamically switch between two sets of outputs based on a boolean condition. This node is particularly useful in scenarios where you need to execute different branches of logic or processing paths depending on a true or false condition. By providing two sets of outputs for both true and false conditions, LazySwitch2way offers flexibility and control over the flow of data, enabling more complex and responsive workflows. Its primary function is to evaluate a boolean input and return the corresponding outputs, making it an essential tool for creating adaptive and efficient node-based systems.

šŸŽˆLazySwitch2way Input Parameters:

boolean

The boolean parameter is a critical input that determines which set of outputs will be activated. It accepts a boolean value, either True or False, with a default value of True. When set to True, the node will output the values associated with the ON_TRUE and on_true parameters. Conversely, when set to False, it will output the values associated with the ON_FALSE and on_false parameters. This parameter is essential for controlling the flow of logic within your node setup, allowing you to switch between different processing paths based on dynamic conditions.

ON_TRUE

The ON_TRUE parameter is an input that holds the value to be output when the boolean parameter is True. It is designed to be a lazy input, meaning it is only evaluated when needed, which can optimize performance by avoiding unnecessary computations. This parameter can accept any data type, providing flexibility in the types of data you can work with. It is crucial for defining the output that should be used when the condition is met.

on_true

Similar to ON_TRUE, the on_true parameter is another input that holds a value to be output when the boolean parameter is True. It also supports lazy evaluation and can accept any data type. This parameter allows for additional output options, enabling more complex branching logic and data handling when the condition is true.

ON_FALSE

The ON_FALSE parameter is an input that holds the value to be output when the boolean parameter is False. Like the ON_TRUE parameter, it is lazily evaluated and can accept any data type. This parameter is essential for defining the output that should be used when the condition is not met, allowing you to handle alternative processing paths effectively.

on_false

The on_false parameter functions similarly to ON_FALSE, providing another input for a value to be output when the boolean parameter is False. It supports lazy evaluation and can accept any data type, offering additional flexibility in defining outputs for the false condition. This parameter is useful for creating more nuanced and detailed branching logic in your workflows.

šŸŽˆLazySwitch2way Output Parameters:

OUTPUT

The OUTPUT parameter is the primary output of the node when the boolean parameter is True. It returns the value provided in the ON_TRUE input, allowing you to pass data through the node based on the evaluated condition. This output is crucial for continuing the flow of data in your workflow when the true condition is met.

output

The output parameter is an additional output that is activated when the boolean parameter is True. It returns the value from the on_true input, providing another layer of output for the true condition. This output is useful for handling multiple data streams or outputs simultaneously when the condition is true.

šŸŽˆLazySwitch2way Usage Tips:

  • Use the LazySwitch2way node to manage complex workflows that require conditional logic, allowing you to switch between different processing paths based on dynamic conditions.
  • Take advantage of the lazy evaluation feature to optimize performance by ensuring that only the necessary inputs are evaluated, reducing computational overhead.

šŸŽˆLazySwitch2way Common Errors and Solutions:

Missing ON_TRUE or on_true

  • Explanation: This error occurs when the boolean parameter is True, but the ON_TRUE or on_true input is not provided.
  • Solution: Ensure that both ON_TRUE and on_true inputs are supplied when the boolean parameter is set to True.

Missing ON_FALSE or on_false

  • Explanation: This error occurs when the boolean parameter is False, but the ON_FALSE or on_false input is not provided.
  • Solution: Ensure that both ON_FALSE and on_false inputs are supplied when the boolean parameter is set to False.

šŸŽˆLazySwitch2way Related Nodes

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