ComfyUI  >  Nodes  >  ComfyUI Inspire Pack >  Load Prompts From Dir (Inspire)

ComfyUI Node: Load Prompts From Dir (Inspire)

Class Name

LoadPromptsFromDir __Inspire

Category
InspirePack/Prompt
Author
Dr.Lt.Data (Account age: 471 days)
Extension
ComfyUI Inspire Pack
Latest Updated
7/2/2024
Github Stars
0.3K

How to Install ComfyUI Inspire Pack

Install this extension via the ComfyUI Manager by searching for  ComfyUI Inspire Pack
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Inspire Pack in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Load Prompts From Dir (Inspire) Description

Streamline loading multiple prompt files from directory for AI artists, automating parsing and extraction of positive/negative prompts.

Load Prompts From Dir (Inspire):

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.

Load Prompts From Dir (Inspire) Input Parameters:

prompt_dir

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.

Load Prompts From Dir (Inspire) Output Parameters:

prompts

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.

Load Prompts From Dir (Inspire) Usage Tips:

  • Ensure that all prompt files in the specified directory are correctly formatted with positive: and negative: sections to avoid parsing errors.
  • Regularly update the directory with new prompt files to keep your prompt collection fresh and diverse.
  • Use descriptive file names for your prompt files to make it easier to identify and manage them within the directory.

Load Prompts From Dir (Inspire) Common Errors and Solutions:

[WARN] LoadPromptsFromDir: invalid prompt format in '<file_name>'

  • Explanation: This warning indicates that the node encountered a file that does not follow the expected prompt format.
  • Solution: Check the specified file and ensure it contains both positive: and negative: sections. Correct any formatting issues and try again.

[ERROR] LoadPromptsFromDir: an error occurred while processing '<file_name>': <error_message>

  • Explanation: This error occurs when the node encounters an issue while reading or processing a file.
  • Solution: Verify that the file is accessible and not corrupted. Ensure that the file is encoded in UTF-8 and that the directory path is correct. If the problem persists, check the error message for more details and address the specific issue mentioned.

Load Prompts From Dir (Inspire) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Inspire Pack
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.