ComfyUI > Nodes > Comfyroll Studio > ⚙️ CR Set Value On Binary

ComfyUI Node: ⚙️ CR Set Value On Binary

Class Name

CR Set Value On Binary

Category
🧩 Comfyroll Studio/🛠️ Utils/🔀 Conditional
Author
Suzie1 (Account age: 2158days)
Extension
Comfyroll Studio
Latest Updated
2024-06-05
Github Stars
0.49K

How to Install Comfyroll Studio

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

⚙️ CR Set Value On Binary Description

Conditional output based on binary input for dynamic value setting and workflow automation.

⚙️ CR Set Value On Binary:

The CR Set Value On Binary node is designed to provide conditional outputs based on a binary input. This node is particularly useful when you need to dynamically set values depending on a binary condition, such as a switch or a flag. By leveraging this node, you can streamline your workflow by automating the selection of different values based on a simple binary input. This can be especially beneficial in scenarios where you need to toggle between two states or values, ensuring that your process remains efficient and adaptable.

⚙️ CR Set Value On Binary Input Parameters:

binary

The binary parameter is an integer input that determines which value will be selected. It accepts values of 0 or 1, with a default value of 1. When set to 1, the node will output the value_if_1; when set to 0, it will output the value_if_0. This parameter is essential for controlling the conditional logic of the node.

value_if_1

The value_if_1 parameter is a float input that specifies the value to be output when the binary parameter is set to 1. It has a default value of 1 and can range from -18446744073709551615 to 18446744073709551615. This parameter allows you to define the output value for the true condition of the binary input.

value_if_0

The value_if_0 parameter is a float input that specifies the value to be output when the binary parameter is set to 0. It has a default value of 0 and can range from -18446744073709551615 to 18446744073709551615. This parameter allows you to define the output value for the false condition of the binary input.

⚙️ CR Set Value On Binary Output Parameters:

INT

The INT output is an integer representation of the selected value based on the binary input. If the binary input is 1, this will be the integer form of value_if_1; if the binary input is 0, it will be the integer form of value_if_0. This output is useful for scenarios where an integer value is required.

FLOAT

The FLOAT output is the float representation of the selected value based on the binary input. If the binary input is 1, this will be value_if_1; if the binary input is 0, it will be value_if_0. This output is essential for maintaining precision in calculations or further processing.

show_help

The show_help output is a string containing a URL to the documentation for the node. This provides a quick reference for users to understand the node's functionality and usage. The URL is https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Other-Nodes#cr-set-value-on-boolean.

⚙️ CR Set Value On Binary Usage Tips:

  • Use the binary parameter to easily switch between two different values in your workflow, simplifying conditional logic.
  • Ensure that the value_if_1 and value_if_0 parameters are set to appropriate values for your specific use case to avoid unexpected results.

⚙️ CR Set Value On Binary Common Errors and Solutions:

Invalid binary input

  • Explanation: The binary parameter must be either 0 or 1. - Solution: Ensure that the binary input is set to either 0 or 1.

Out of range value_if_1 or value_if_0

  • Explanation: The value_if_1 and value_if_0 parameters must be within the range of -18446744073709551615 to 18446744073709551615.
  • Solution: Adjust the value_if_1 and value_if_0 parameters to be within the specified range.

⚙️ CR Set Value On Binary Related Nodes

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