ComfyUI  >  Nodes  >  ControlFlowUtils >  🔶 Simple Toggle

ComfyUI Node: 🔶 Simple Toggle

Class Name

SimpleToggle

Category
🐺 VykosX-ControlFlowUtils
Author
VykosX (Account age: 2024 days)
Extension
ControlFlowUtils
Latest Updated
10/1/2024
Github Stars
0.1K

How to Install ControlFlowUtils

Install this extension via the ComfyUI Manager by searching for  ControlFlowUtils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ControlFlowUtils 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🔶 Simple Toggle Description

Emit boolean values for workflow control, toggle between True and False for conditional paths in AI processes.

🔶 Simple Toggle:

The SimpleToggle node is designed to provide a straightforward way to emit boolean values (True or False) as inputs for other nodes within your workflow. This node is particularly useful when you need to control the flow of your operations based on simple on/off conditions. By toggling between True and False, you can easily manage conditional paths, enabling or disabling certain parts of your workflow without complex logic. This node is essential for scenarios where you need a quick and efficient way to switch states, making it a valuable tool for AI artists who want to streamline their processes.

🔶 Simple Toggle Input Parameters:

toggle

The toggle parameter is a boolean input that determines the state of the node. When set to True, the node emits a True value; when set to False, it emits a False value. This parameter is crucial for controlling the flow of your operations based on simple conditions. The default value is True, and it can be toggled between True and False as needed. This parameter also features labels for better clarity: "Enabled" when True and "Disabled" when False.

run_after

The run_after parameter is an optional input that allows you to specify a dependency on another node. By connecting another node to this slot, you ensure that the SimpleToggle node runs only after the specified node has completed its execution. This is useful for creating dependencies and ensuring the correct sequence of operations in your workflow. The parameter accepts any type of input, and its primary function is to manage execution order rather than influence the boolean output.

🔶 Simple Toggle Output Parameters:

out

The out parameter is the boolean output of the SimpleToggle node. It reflects the state of the toggle input, emitting either True or False based on the value of the toggle parameter. This output can be used as an input for other nodes, allowing you to control their behavior based on the boolean state. The out parameter is essential for creating conditional paths and managing the flow of your operations efficiently.

🔶 Simple Toggle Usage Tips:

  • Use the toggle parameter to quickly switch between enabling and disabling parts of your workflow without needing complex logic.
  • Connect the run_after parameter to another node if you need to ensure that the SimpleToggle node runs only after a specific node has completed its execution.
  • Utilize the out parameter to control other nodes based on the boolean state, making it easier to manage conditional operations.

🔶 Simple Toggle Common Errors and Solutions:

"Invalid input type for toggle"

  • Explanation: The toggle parameter expects a boolean value, but an invalid type was provided.
  • Solution: Ensure that the toggle parameter is set to either True or False.

"Missing dependency in run_after"

  • Explanation: The run_after parameter expects a connection to another node, but none was provided.
  • Solution: Connect a node to the run_after parameter to establish the correct execution order.

"Unexpected output type"

  • Explanation: The out parameter is expected to be a boolean, but an unexpected type was encountered.
  • Solution: Verify that the toggle parameter is correctly set to True or False to ensure the out parameter emits the correct boolean value.

🔶 Simple Toggle Related Nodes

Go back to the extension to check out more related nodes.
ControlFlowUtils
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.