Nodes/ComfyUI-UniversalToolkit/Lazy Switch KJ (UTK)
ComfyUI Node

Lazy Switch KJ (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

By whmc76·Created about a year ago·Updated 24 days ago· 70
Lazy Switch KJ (UTK)
  • on_false
  • on_true
  • output
switch
CategoryUniversalToolkit/Tools

Inputs (3)

NameTypeDefaultDescription
switchBOOLEANBoolean value to control which input is returned
on_false*Value returned when switch is False
on_true*Value returned when switch is True

Outputs (1)

NameTypeDescription
output*