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-MAINodes > H3 Mode Switch (preview / final, lazy)

ComfyUI Node: H3 Mode Switch (preview / final, lazy)

Class Name

H3ModeSwitch

Category
utils/minimax
Author
matlowai (Account age: 1004days)
Extension
ComfyUI-MAINodes
Latest Updated
2026-08-26
Github Stars
0.11K

How to Install ComfyUI-MAINodes

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

H3 Mode Switch (preview / final, lazy) Description

Efficient conditional execution management for AI art projects, optimizing performance by selecting and executing specific branches based on conditions.

H3 Mode Switch (preview / final, lazy):

The H3ModeSwitch node is designed to provide a flexible and efficient way to manage conditional execution paths within your AI art projects. This node acts as a lazy two-way switch, meaning it only executes the branch that is selected based on a given condition, thereby optimizing performance by avoiding unnecessary computations. This functionality is particularly beneficial in scenarios where you need to toggle between different modes or settings, such as preview and final render modes, without executing both paths. By using H3ModeSwitch, you can streamline your workflow, reduce computational overhead, and focus resources on the most relevant tasks, enhancing both the efficiency and effectiveness of your creative process.

H3 Mode Switch (preview / final, lazy) Input Parameters:

switch

The switch parameter is a boolean input that determines which branch of the node will be executed. If set to true, the node will execute the on_true branch; if set to false, it will execute the on_false branch. This parameter is crucial for controlling the flow of execution and allows you to dynamically choose between different processing paths based on your specific needs or conditions. There are no minimum or maximum values as it is a boolean, but the default value is typically false.

on_true

The on_true parameter represents the input that will be processed if the switch parameter is set to true. This input is evaluated lazily, meaning it is only computed when needed, which helps in conserving resources and improving performance. The specific type or content of this input can vary depending on the context in which the node is used, allowing for a high degree of flexibility in its application.

on_false

The on_false parameter is similar to on_true, but it is the input that will be processed if the switch parameter is set to false. Like on_true, this input is also evaluated lazily, ensuring that it is only computed when necessary. This parameter allows you to define an alternative processing path, providing a fallback or secondary option that can be executed based on the condition specified by the switch.

H3 Mode Switch (preview / final, lazy) Output Parameters:

output

The output parameter is the result of the execution of either the on_true or on_false branch, depending on the value of the switch parameter. This output reflects the processed data or result from the selected branch and is crucial for further processing or decision-making in your workflow. The flexibility of this output allows it to adapt to various types of data, making it a versatile component in your node-based projects.

H3 Mode Switch (preview / final, lazy) Usage Tips:

  • Use the switch parameter to dynamically control the execution flow based on real-time conditions or user inputs, optimizing your workflow for different scenarios.
  • Leverage the lazy evaluation of on_true and on_false to minimize computational overhead by ensuring only the necessary branch is executed.

H3 Mode Switch (preview / final, lazy) Common Errors and Solutions:

Missing on_true or on_false Input

  • Explanation: This error occurs when the switch is set to true or false, but the corresponding on_true or on_false input is not provided.
  • Solution: Ensure that both on_true and on_false inputs are defined and available for execution, even if one is not used in a particular scenario.

Invalid switch Value

  • Explanation: The switch parameter must be a boolean value (true or false). If an invalid type is provided, the node cannot determine which branch to execute.
  • Solution: Verify that the switch parameter is correctly set to a boolean value, ensuring proper execution of the desired branch.

H3 Mode Switch (preview / final, lazy) Related Nodes

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

H3 Mode Switch (preview / final, lazy)