Visit ComfyUI Online for ready-to-use ComfyUI environment
Conditional output based on binary input for dynamic value setting and workflow automation.
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.
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.
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.
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.
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.
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.
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
.
binary
parameter to easily switch between two different values in your workflow, simplifying conditional logic.value_if_1
and value_if_0
parameters are set to appropriate values for your specific use case to avoid unexpected results.binary
parameter must be either 0 or 1. - Solution: Ensure that the binary
input is set to either 0 or 1.value_if_1
and value_if_0
parameters must be within the range of -18446744073709551615 to 18446744073709551615.value_if_1
and value_if_0
parameters to be within the specified range.© Copyright 2024 RunComfy. All Rights Reserved.