Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates conditional logic with two output sets based on boolean condition for adaptive workflows.
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.
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.
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.
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.
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.
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.
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.
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
node to manage complex workflows that require conditional logic, allowing you to switch between different processing paths based on dynamic conditions.boolean
parameter is True
, but the ON_TRUE
or on_true
input is not provided.ON_TRUE
and on_true
inputs are supplied when the boolean
parameter is set to True
.boolean
parameter is False
, but the ON_FALSE
or on_false
input is not provided.ON_FALSE
and on_false
inputs are supplied when the boolean
parameter is set to False
.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.