Visit ComfyUI Online for ready-to-use ComfyUI environment
Automates loading single prompts from files for AI artists, saving time and reducing errors.
The LoadSinglePromptFromFile (Inspire)
node is designed to streamline the process of loading a single prompt from a specified file. This node is particularly useful for AI artists who work with predefined prompts stored in text files. By automating the extraction of prompts, it saves time and reduces the potential for manual errors. The node reads the content of the specified file, splits it into individual prompts, and extracts the positive and negative text components from the selected prompt. This functionality is essential for artists who need to quickly access and utilize specific prompts in their creative workflows.
The prompt_file
parameter specifies the name of the file from which the prompt will be loaded. This file should be located in the predefined prompts directory. The parameter is crucial as it directs the node to the correct file containing the desired prompt. There are no specific minimum or maximum values for this parameter, but it must be a valid file name within the prompts directory.
The index
parameter determines which prompt to load from the file. Prompts within the file are typically separated by a specific delimiter, and this index allows you to select the exact prompt you need. If the specified index is out of range, the node will default to the last prompt in the file. This parameter is essential for pinpointing the exact prompt to be used, especially in files containing multiple prompts. The index should be a non-negative integer.
The prompts
output parameter is a list containing tuples of the form (positive_text, negative_text, prompt_file)
. Each tuple represents a single prompt extracted from the file, with positive_text
and negative_text
being the respective components of the prompt, and prompt_file
indicating the source file. This output is crucial for downstream nodes or processes that utilize these text components for further operations, such as generating images or other creative outputs.
index
parameter to select specific prompts from files containing multiple entries, which can help in testing and refining different prompt variations.<prompt_file>
'positive:
and negative:
sections clearly defined.<prompt_file>
': <error_message>
prompt_file
parameter.© Copyright 2024 RunComfy. All Rights Reserved.