Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > deforum-comfy-nodes-deforum > Lazy Switch | Deforum

ComfyUI Node: Lazy Switch | Deforum

Class Name

LazySwitch| Deforum

Category
Deforum/Logic
Author
deforum-art (Account age: 0days)
Extension
deforum-comfy-nodes-deforum
Latest Updated
2026-11-03
Github Stars
0.03K

How to Install deforum-comfy-nodes-deforum

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

Lazy Switch | Deforum Description

Selects and passes through one of two values based on a boolean, requesting only the chosen branch.

Lazy Switch | Deforum| Lazy Switch | Deforum:

LazySwitch| Lazy Switch | Deforum chooses between two possible values using a true-or-false condition. Its lazy behavior means it requests the selected branch when that value is needed, rather than requesting both branches simply to make a choice. This is useful when you want a workflow to follow one of two paths while avoiding unnecessary work on the path you did not select. The node passes through the chosen value; it does not modify that value.

Lazy Switch | Deforum| Lazy Switch | Deforum Input Parameters:

switch

A required BOOLEAN value that determines which branch the node selects. When it is true, the node selects on_true; when it is false, it selects on_false. The available states are true and false. The source does not specify a default value, and numeric minimum and maximum values do not apply.

on_false

A required connection that supplies the value selected when switch is false. Its * type indicates that the node interface accepts a value without specifying one particular data type. This input is marked lazy: when the false branch is selected and its value has not been supplied, the node requests it. No default, numeric minimum, maximum, or additional options are specified for this input.

on_true

A required connection that supplies the value selected when switch is true. Like on_false, its * type does not restrict it to one specified data type, and it is marked lazy. When the true branch is selected and its value has not been supplied, the node requests it. No default, numeric minimum, maximum, or additional options are specified for this input.

Lazy Switch | Deforum| Lazy Switch | Deforum Output Parameters:

*

The node’s single output is the value from the selected branch: on_true when switch is true, or on_false when it is false. The * label indicates that the output has no single specified data type. The node returns the chosen value as it receives it, so what you can do with the output depends on that value and on what the next node accepts.

Lazy Switch | Deforum| Lazy Switch | Deforum Usage Tips:

  • Connect the two alternative values to on_false and on_true, then use switch to choose which one should continue through your workflow.
  • Put work you only need under one condition on its corresponding branch. The lazy inputs let the node request the selected value without requesting the other branch for this choice.
  • Check that the node receiving * can handle either value you might select. An unrestricted socket on LazySwitch| Lazy Switch | Deforum does not make unlike values interchangeable for downstream nodes.
  • If the result is unexpected, inspect the current value of switch first: true selects on_true, and false selects on_false.

Lazy Switch | Deforum| Lazy Switch | Deforum Common Errors and Solutions:

Required input is not connected

  • Explanation: The interface lists switch, on_false, and on_true as required. Your workflow may report a missing-input or validation error if one is left unconnected; the exact message is not defined in the supplied source.
  • Solution: Connect a boolean condition to switch and provide values for both branches.

Selected branch produces no value

  • Explanation: The node requests the selected lazy input when that input is None. If the selected branch still does not supply a value, the switch method can return None; the source does not define a dedicated error message for this case.
  • Solution: Check the node feeding the selected branch and make sure it produces a value for the current workflow run.

Downstream node rejects the selected value

  • Explanation: LazySwitch| Lazy Switch | Deforum passes through the chosen value without converting it. A later node may reject that value if it expects a different type or format. Any error wording comes from that later node and is not specified here.
  • Solution: Make both branches produce values the receiving node can accept, or add an appropriate conversion on the branch that needs it.

Output comes from the opposite branch than expected

  • Explanation: The choice follows the boolean value exactly: true selects on_true and false selects on_false. The supplied source defines no error message for an unexpected but valid selection.
  • Solution: Inspect the value connected to switch and confirm that each branch is connected to the intended input.

Lazy Switch | Deforum Related Nodes

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

Lazy Switch | Deforum