Visit ComfyUI Online for ready-to-use ComfyUI environment
Converts string numbers to numerical form, handling negatives and rounding for AI art workflows.
The CR String To Number node is designed to convert a string representation of a number into its numerical form, either as an integer or a float. This node is particularly useful when dealing with text inputs that need to be processed as numerical values for further operations. It ensures that the conversion is handled smoothly, even for negative numbers, and provides options for rounding the resulting integer value. This node is essential for scenarios where numerical computations are required based on string inputs, making it a versatile tool in your AI art workflow.
This parameter represents the string input that you want to convert into a numerical value. The string should be a valid representation of a number, which can include negative signs and decimal points. If the string is not a valid number, the node will not perform the conversion and will return an error. There are no specific minimum or maximum values for this parameter, but it must be a valid numerical string.
This parameter determines how the resulting integer value should be rounded. It accepts three options: "round up", "round down", and "round". "Round up" will increase the integer value by one if the number is positive, and keep it the same if negative. "Round down" will decrease the integer value by one if the number is negative, and keep it the same if positive. "Round" will round the number to the nearest integer. This parameter helps in controlling the precision of the integer output based on your specific needs.
This output parameter provides the integer representation of the input string after applying the specified rounding method. It is useful for scenarios where an integer value is required for further processing or calculations.
This output parameter provides the float representation of the input string. It is useful for scenarios where a precise numerical value with decimal points is required for further processing or calculations.
This output parameter provides a URL link to the documentation or help page for the CR String To Number node. It is useful for users who need additional information or guidance on how to use the node effectively.
© Copyright 2024 RunComfy. All Rights Reserved.