Visit ComfyUI Online for ready-to-use ComfyUI environment
Streamline loading multiple prompt files from directory for AI artists, automating parsing and extraction of positive/negative prompts.
The LoadPromptsFromDir __Inspire
node is designed to streamline the process of loading multiple prompt files from a specified directory. This node is particularly useful for AI artists who work with a large number of text prompts stored in separate files. By automating the loading and parsing of these files, the node saves time and reduces the potential for manual errors. It reads all .txt
files in the given directory, extracts the positive and negative prompts from each file, and returns them in a structured format. This functionality is essential for efficiently managing and utilizing a large collection of prompts, enabling you to focus more on the creative aspects of your work.
The prompt_dir
parameter specifies the directory from which the node will load the prompt files. This parameter is crucial as it directs the node to the correct location where your prompt files are stored. The directory path should be relative to the global prompts_path
variable. Ensure that the directory contains only .txt
files formatted correctly for the node to process them efficiently. There are no specific minimum or maximum values for this parameter, but it must be a valid directory path.
The prompts
output parameter is a list of tuples, where each tuple contains the positive prompt, negative prompt, and the file name from which these prompts were extracted. This structured output allows you to easily access and utilize the prompts in your AI art projects. The positive and negative prompts are extracted based on a specific pattern, ensuring that the data is organized and ready for further processing or use in your creative workflows.
positive:
and negative:
sections to avoid parsing errors.<file_name>
'positive:
and negative:
sections. Correct any formatting issues and try again.<file_name>
': <error_message>
© Copyright 2024 RunComfy. All Rights Reserved.