Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates reading and processing of CSV files in ComfyUI, offering flexible data extraction and selection methods.
The AD_CSVReader
node is designed to facilitate the reading and processing of CSV files within the ComfyUI environment. This node allows you to extract data from CSV files, either by selecting specific columns or by processing the entire content. It offers flexibility in data selection through both random and sequential methods, making it a versatile tool for handling structured data. By leveraging a seed for randomization and an increment for sequential access, the node provides a robust mechanism for data retrieval, which can be particularly useful in scenarios where you need to iterate over data or select random samples. The node's primary goal is to simplify the interaction with CSV files, enabling you to focus on data manipulation and analysis without worrying about the underlying file handling complexities.
The file_path
parameter specifies the location of the CSV file you wish to read. It is a string input that should contain the full path to the file. This parameter is crucial as it directs the node to the correct file for processing. The default value is an empty string, and it does not support multiline input.
The column_index
parameter determines which column of the CSV file to process. It is an integer value where 0
indicates that all columns should be used. If you specify a positive integer, the node will process only that specific column. The minimum value is 0
, and the maximum is 1000
, with a default of 0
.
The seed
parameter is an integer used to initialize the random number generator for selecting a random line from the CSV file. This ensures that the random selection is reproducible. The minimum value is 0
, and the maximum is 0xffffffffffffffff
, with a default of 0
.
The increment
parameter is an integer that defines the step size for sequential line selection. A value of 0
triggers random selection, while any other value will select lines sequentially based on the current index. The range is from -1000
to 1000
, with a default of 1
.
The index
parameter is an optional integer that specifies the starting row for processing. It allows you to begin reading from a specific line, with 0
or 1
representing the first row. The minimum value is 0
, and the maximum is 0xffffffffffffffff
. This parameter is forced to be input by the user and comes with a tooltip for guidance.
The File_Path
output returns the path of the CSV file that was processed. This is useful for verification and logging purposes.
The Seed
output provides the seed value used for random selection, allowing you to track the randomization process and ensure reproducibility.
The Increment
output returns the increment value used for sequential selection, which helps in understanding the step size used during data processing.
The Full_Content
output contains the entire processed content of the CSV file as a single string. This is useful for scenarios where you need to analyze or display the complete data set.
The Lines
output is a list of strings representing the processed lines from the CSV file. This allows for easy iteration and manipulation of individual data entries.
The Total_Lines
output provides the total number of lines in the CSV file, offering insight into the size of the data set being processed.
The Selected_Line
output returns the specific line that was selected based on the seed and increment parameters. This is particularly useful for tasks that require sampling or specific data retrieval.
file_path
is correctly specified to avoid file not found errors.column_index
to focus on specific data columns, which can optimize processing time and resource usage.seed
to a fixed value for consistent random selections across different runs.increment
to control the flow of data processing, especially when iterating over large data sets.index
parameter to start processing from a specific row, which can be helpful for resuming tasks or skipping headers.<column_index>
<error_message>
file_path
for accuracy, ensure the file exists, and verify that you have the necessary permissions to access it.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.