Visit ComfyUI Online for ready-to-use ComfyUI environment
Converts comma-separated integers string to integer array for structured data processing.
The Input_String to Int Array node is designed to convert a string of comma-separated integers into an array of integers. This node is particularly useful when dealing with input data that may come in different formats, such as JSON requests or web UI inputs. By accepting both string and array types as inputs, it provides flexibility and ensures compatibility with various data sources. The primary function of this node is to parse the input string, split it by commas, and convert each segment into an integer, resulting in an array of integers. This capability is essential for scenarios where numerical data needs to be processed or analyzed in a structured format.
The inStr
parameter is the input string that contains the integers to be converted into an array. This string should have integers separated by commas. For example, "1,2,3,4" will be converted into the array [1, 2, 3, 4]. If the input is already an array of integers, the node will recognize it and return it as is. This parameter ensures that the node can handle both string and array inputs, making it versatile for different use cases. The default value for this parameter is an empty string ("").
The INT_ARRAY
output parameter is the resulting array of integers after the input string has been processed. This array is generated by splitting the input string by commas and converting each segment into an integer. If the input was already an array of integers, it will be returned directly. This output is crucial for further processing or analysis of numerical data in a structured format.
© Copyright 2024 RunComfy. All Rights Reserved.