ComfyUI > Nodes > WAS Node Suite > Number Input Switch

ComfyUI Node: Number Input Switch

Class Name

Number Input Switch

Category
WAS Suite/Logic
Author
WASasquatch (Account age: 4688days)
Extension
WAS Node Suite
Latest Updated
2024-08-25
Github Stars
1.07K

How to Install WAS Node Suite

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

Number Input Switch Description

Facilitates conditional selection between two numerical inputs based on a boolean condition for AI art generation.

Number Input Switch:

The Number Input Switch node is designed to facilitate conditional selection between two numerical inputs based on a boolean condition. This node is particularly useful when you need to dynamically choose between two numbers during the execution of your AI art generation process. By leveraging this node, you can streamline your workflow and ensure that the appropriate numerical value is used based on specific conditions, enhancing the flexibility and efficiency of your projects.

Number Input Switch Input Parameters:

number_a

This parameter represents the first numerical input that the node can select. It can be any number and serves as one of the two potential outputs based on the boolean condition. The value of number_a will be chosen if the boolean condition is true.

number_b

This parameter represents the second numerical input that the node can select. Similar to number_a, it can be any number and serves as the alternative output based on the boolean condition. The value of number_b will be chosen if the boolean condition is false.

boolean

This boolean parameter determines which of the two numerical inputs will be selected. If set to true, the node will output number_a; if set to false, it will output number_b. This parameter is crucial for controlling the conditional logic of the node.

Number Input Switch Output Parameters:

NUMBER

This output represents the selected numerical value based on the boolean condition. It will be either number_a or number_b, depending on the value of the boolean parameter.

FLOAT

This output provides the selected numerical value in floating-point format. It ensures that the output is compatible with operations or nodes that require a float input.

INT

This output provides the selected numerical value in integer format. It ensures that the output is compatible with operations or nodes that require an integer input.

Number Input Switch Usage Tips:

  • Use the boolean parameter to dynamically switch between two numerical values based on specific conditions in your workflow.
  • Ensure that the numerical inputs (number_a and number_b) are set appropriately to avoid unexpected results.
  • Utilize the different output formats (NUMBER, FLOAT, INT) to match the requirements of subsequent nodes in your workflow.

Number Input Switch Common Errors and Solutions:

Invalid number input

  • Explanation: This error occurs if the provided numerical inputs are not valid numbers.
  • Solution: Ensure that both number_a and number_b are valid numerical values.

Boolean parameter not set

  • Explanation: This error occurs if the boolean parameter is not provided or is set incorrectly.
  • Solution: Make sure to set the boolean parameter to either true or false to control the selection logic.

Unexpected output format

  • Explanation: This error occurs if the output format does not match the expected type for subsequent nodes.
  • Solution: Verify that you are using the correct output format (NUMBER, FLOAT, INT) as required by the next node in your workflow.

Number Input Switch Related Nodes

Go back to the extension to check out more related nodes.
WAS Node Suite
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.