Visit ComfyUI Online for ready-to-use ComfyUI environment
Reads text file content for AI art projects, supports line-by-line reading, streamlines data access and manipulation.
The Load Text File node is designed to read the contents of a text file and make the data available for further processing within your AI art projects. This node is particularly useful for loading large text datasets, configuration files, or any other textual information that you may need to incorporate into your workflow. By using this node, you can easily access and manipulate text data without manually copying and pasting content, thus streamlining your creative process. The node also supports reading files line by line, which can be beneficial for handling large files efficiently.
This parameter specifies the path to the text file you want to load. It is a string input where you need to provide the full path to the file. If the file path is incorrect or the file does not exist, the node will return an error. The default value is an empty string, meaning no file is specified by default.
This parameter allows you to assign a custom name to the dictionary key under which the file's contents will be stored. By default, it uses the filename (without extension) as the dictionary key. This is useful if you want to load multiple files and distinguish their contents by different names. The default value is [filename]
.
This output provides the entire content of the text file as a single string. It is useful for scenarios where you need to process or analyze the entire text at once.
This output is a dictionary where the key is the dictionary_name
(or the filename if not specified) and the value is a list of lines from the text file. This format is particularly useful for line-by-line processing or when you need to access specific parts of the text.
dictionary_name
parameter to manage multiple text files efficiently by assigning unique keys to each file's content.DICT
output for line-by-line processing, which can be more efficient for large files.<file_path>
specified cannot be found.file_path
parameter is empty.<index>
© Copyright 2024 RunComfy. All Rights Reserved.