ComfyUI  >  Nodes  >  ComfyUI Impact Pack >  ImpactConditionalBranchSelMode

ComfyUI Node: ImpactConditionalBranchSelMode

Class Name

ImpactConditionalBranchSelMode

Category
ImpactPack/Logic
Author
Dr.Lt.Data (Account age: 458 days)
Extension
ComfyUI Impact Pack
Latest Updated
6/19/2024
Github Stars
1.4K

How to Install ComfyUI Impact Pack

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

ImpactConditionalBranchSelMode Description

Facilitates conditional branching in AI art workflows based on boolean conditions, enabling dynamic value selection.

ImpactConditionalBranchSelMode:

The ImpactConditionalBranchSelMode node is designed to facilitate conditional branching in your AI art workflows based on boolean conditions. This node allows you to dynamically select between two values depending on a condition, with an additional mode selection that determines when the condition is evaluated. This flexibility can be particularly useful in scenarios where you need to make decisions based on user input or other runtime conditions, enhancing the interactivity and adaptability of your AI art projects.

ImpactConditionalBranchSelMode Input Parameters:

cond

The cond parameter is a boolean input that determines which value will be selected. If cond is True, the node will return the tt_value; otherwise, it will return the ff_value. This parameter is crucial as it directly influences the branching logic of the node.

sel_mode

The sel_mode parameter is a boolean input that specifies when the condition should be evaluated. It has two options: select_on_prompt (True) and select_on_execution (False). The default value is True. When set to select_on_prompt, the condition is evaluated based on the prompt input; when set to select_on_execution, the condition is evaluated during the execution phase. This parameter adds an extra layer of control over the timing of the condition evaluation.

tt_value

The tt_value parameter is an optional input that represents the value to be returned if the cond parameter is True. This can be of any type, allowing for flexible and dynamic value selection based on the condition.

ff_value

The ff_value parameter is an optional input that represents the value to be returned if the cond parameter is False. Similar to tt_value, this can be of any type, providing versatility in the node's output based on the condition.

ImpactConditionalBranchSelMode Output Parameters:

any_typ

The output of the ImpactConditionalBranchSelMode node is a single value of any type, determined by the cond parameter. If cond is True, the output will be the tt_value; if cond is False, the output will be the ff_value. This output is essential for directing the flow of your AI art workflow based on dynamic conditions.

ImpactConditionalBranchSelMode Usage Tips:

  • Use the sel_mode parameter to control when the condition is evaluated, which can be particularly useful for interactive applications where user input may change the condition.
  • Ensure that both tt_value and ff_value are properly set to avoid unexpected results, especially when the condition can vary frequently.

ImpactConditionalBranchSelMode Common Errors and Solutions:

Missing tt_value or ff_value

  • Explanation: If either tt_value or ff_value is not provided, the node may not function as expected.
  • Solution: Ensure that both tt_value and ff_value are set, even if they are optional, to guarantee the node operates correctly.

Invalid cond Input

  • Explanation: The cond parameter must be a boolean value. If an invalid type is provided, the node will not execute properly.
  • Solution: Verify that the cond input is a boolean value to ensure correct branching logic.

Incorrect sel_mode Configuration

  • Explanation: If the sel_mode is not set correctly, the condition may be evaluated at the wrong time, leading to unexpected results.
  • Solution: Double-check the sel_mode setting to ensure it matches the desired timing for condition evaluation.

ImpactConditionalBranchSelMode Related Nodes

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