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 > comfyui-obvpm > Lazy Case Switch (obvpm)

ComfyUI Node: Lazy Case Switch (obvpm)

Class Name

LazyCaseSwitch (obvpm)

Category
obvpm/switches
Author
chanon (Account age: 5883days)
Extension
comfyui-obvpm
Latest Updated
2026-09-17
Github Stars
0.04K

How to Install comfyui-obvpm

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

Streamline decision-making in node workflows by selecting branches based on names, optimizing performance and resource management.

LazyCaseSwitch (obvpm):

The LazyCaseSwitch node is designed to streamline decision-making processes within a node-based workflow by selecting one of several branches based on a specified name rather than a boolean condition. This node is particularly beneficial for scenarios where you need to dynamically choose between multiple paths, as it allows you to define case names and select the appropriate branch to execute based on the input. The node is "lazy," meaning that only the selected branch is executed, which optimizes performance by skipping the execution of unselected branches and their upstream processes. This feature is especially useful in complex workflows where efficiency and resource management are crucial. By using LazyCaseSwitch, you can create more flexible and efficient workflows that adapt to varying conditions without unnecessary computation.

LazyCaseSwitch (obvpm) Input Parameters:

selected

The selected parameter is a string that specifies the name of the branch to be executed. It is crucial for determining which branch of the workflow will run. If the name provided in selected matches one of the case names, the corresponding branch is executed. There is no default value, and it must be set to a valid case name to ensure proper execution.

cases

The cases parameter is a multiline string input where you list the names of the branches, one per line. These names are used to match against the selected parameter to determine which branch to execute. The list of case names is dynamically filled based on the connected branches, and it is essential for defining the possible paths the node can take. There is no default value, and it should be populated with meaningful branch names to ensure the node functions correctly.

fallback

The fallback parameter is an optional input that provides an output when no case line matches the selected parameter. It is lazy, meaning it only executes if selected, and can be left unconnected if not needed. This parameter is useful for handling cases where the selected name does not match any of the defined case names, ensuring that the node can still produce an output.

on_case_1, on_case_2, ..., on_case_16

These parameters represent the potential branches that can be executed when the selected parameter matches the corresponding case name. Each on_case_n is lazy and only executes if its case line is selected. They are optional and can be left unconnected if not needed. These parameters allow you to define up to 16 different branches, providing flexibility in handling various conditions within your workflow.

LazyCaseSwitch (obvpm) Output Parameters:

value

The value output parameter represents the result of the executed branch. If the selected parameter matches a case name, the corresponding branch's output is returned as value. If no match is found and a fallback is provided, the fallback output is returned. If neither a match nor a fallback is available, the output is None. This parameter is crucial for passing the result of the decision-making process to subsequent nodes in the workflow.

LazyCaseSwitch (obvpm) Usage Tips:

  • Ensure that the selected parameter is set to a valid case name to avoid unexpected results or None outputs.
  • Populate the cases parameter with meaningful and distinct names to clearly define the possible branches and improve the readability of your workflow.
  • Utilize the fallback parameter to handle cases where the selected name does not match any defined case names, ensuring that your workflow can continue without interruption.
  • Take advantage of the lazy execution feature to optimize performance by only executing the necessary branches and skipping unselected ones.

LazyCaseSwitch (obvpm) Common Errors and Solutions:

"LazyCaseSwitch: '<selected>' matches no case line and no fallback is connected; outputting None"

  • Explanation: This error occurs when the selected parameter does not match any of the defined case names in the cases parameter, and no fallback is connected to provide an alternative output.
  • Solution: Verify that the selected parameter is set to a valid case name listed in the cases parameter. If necessary, connect a fallback to ensure an output is produced even when no match is found.

Lazy Case Switch (obvpm) Related Nodes

Go back to the extension to check out more related nodes.
comfyui-obvpm
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 Case Switch (obvpm)