Visit ComfyUI Online for ready-to-use ComfyUI environment
Transforms number-like inputs into integer, float, and string formats, extracting and counting numbers.
The ConvertNumberToIntFloatStr node is designed to transform any input that resembles a number into three distinct formats: integer, float, and string. This node is particularly useful for processing data that may be presented in various forms, such as actual numbers, numbers embedded within strings, or strings containing multiple numbers with separators. By leveraging the nums_from_string.get_nums method, the node is highly flexible and can handle a wide range of number-like inputs, making it an essential tool for AI artists who need to manipulate numerical data efficiently. The node's primary goal is to extract numbers from the input, convert them into different formats, and provide a count of the numbers found, thus offering a comprehensive solution for number conversion tasks.
The number parameter accepts any input that can be meaningfully converted into a string containing parseable numbers. This includes actual integers and floats, as well as strings that represent numbers or contain multiple numbers separated by non-comma characters. The parameter is designed to be highly permissive, allowing for a wide range of inputs to be processed. There are no specific minimum, maximum, or default values for this parameter, as its purpose is to accommodate any number-like input.
The int output provides a list of all numbers found in the input, with each number converted to an integer by truncating any decimal parts. This output is useful for scenarios where whole numbers are required, and it helps in simplifying numerical data by removing fractional components.
The float output delivers a list of all numbers found in the input, maintaining their original decimal precision. This output is essential for tasks that require precise numerical data, allowing you to work with the exact values extracted from the input.
The string output consists of a list of numbers found in the input, each converted to a string format. This output is beneficial for situations where numerical data needs to be represented as text, facilitating further text-based processing or display.
The count output provides the total number of numbers identified in the input. This output is valuable for understanding the extent of numerical data present in the input and can be used to verify the completeness of the conversion process.
RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.