Lazy Switch KJ (UTK)

LazySwitchKJ_UTK

Controls flow of execution based on a boolean switch. This node implements lazy evaluation - it only processes the input that will actually be used based on the switch value. This can significantly improve performance by avoiding unnecessary computations in complex workflows. Features: - **Lazy Evaluation**: Only evaluates the selected branch - **Any Type Support**: Works with any data type (images, masks, strings, etc.) - **Flow Control**: Essential for conditional workflow execution - **Performance Optimization**: Reduces unnecessary processing Usage: - Connect your boolean condition to the 'switch' input - Connect the value for False condition to 'on_false' - Connect the value for True condition to 'on_true' - The node will output the appropriate value based on the switch Common use cases: - Conditional image processing pipelines - A/B testing different parameters - Workflow branching based on user input - Performance optimization in complex workflows

Pack: ComfyUI-UniversalToolkit

custom_nodes.ComfyUI-UniversalToolkit

Inputs (3)

NameTypeRequired
switchBOOLEANrequired
on_false*required
on_true*required

Outputs (1)

NameType
output*