🗂️ Prompt Manager:
The PromptManagerNode is a versatile tool designed to help you manage a library of reusable prompt snippets in a structured and user-friendly manner. It allows you to create, edit, and organize prompts into categorized sections, making it easier to reuse and manage complex prompt structures. The node features a unique raw multiline text field, referred to as "Prompt," which can be repositioned among the sections but cannot be renamed or deleted. This node is particularly beneficial for AI artists who frequently work with prompts, as it streamlines the process of prompt management by allowing you to enable or disable sections, randomize entries, and maintain a consistent workflow. The node's functionality is enhanced by a custom UI, which facilitates easy editing and organization of prompt data, ensuring that your creative process remains efficient and organized.
🗂️ Prompt Manager Input Parameters:
prompt_data
The prompt_data parameter is a JSON string that represents the library of categorized prompt snippets. It is a multiline string input that allows you to define and organize your prompts into sections and categories. This parameter is crucial for structuring your prompt library, as it determines the sections and entries that will be available for use. The default value is a JSON representation of the minimal fallback structure, ensuring that you always have a basic setup to start with. This parameter does not have a minimum or maximum value, as it is a flexible text input.
seed
The seed parameter is an integer input that serves as a seed for the client-side randomization feature. It allows you to introduce variability into your prompts by randomizing the order of entries within sections. This parameter is particularly useful when you want to generate different variations of prompts without manually altering the entries. The default value is 0, with a minimum value of 0 and a maximum value of 18,446,744,073,709,551,615 (0xFFFFFFFFFFFFFFFF).
raw_prompt
The raw_prompt parameter is a multiline string input that represents the raw text field labeled "Prompt." This field is unique in that it can be repositioned among the sections but cannot be renamed or deleted. The raw_prompt text is directly included in the final prompt output, making it an essential component of your prompt structure. The default value is an empty string, allowing you to input any text you wish to include in your final prompt.
🗂️ Prompt Manager Output Parameters:
prompt
The prompt output parameter is a string that represents the final constructed prompt. It is generated by combining the contributions from each enabled section in the user-defined order. The locked "Prompt" section contributes the raw_prompt text as-is, while other sections contribute their selected entries joined by ", ". All non-empty section contributions are then joined by ". ". This output is crucial for generating a coherent and structured prompt that can be used in your AI art projects.
🗂️ Prompt Manager Usage Tips:
- Organize your prompt snippets into meaningful categories and sections to make it easier to manage and reuse them in different projects.
- Use the
seedparameter to introduce variability into your prompts, allowing you to explore different creative possibilities without manually altering your entries. - Regularly update and maintain your prompt library to ensure that it remains relevant and useful for your creative process.
🗂️ Prompt Manager Common Errors and Solutions:
JSONDecodeError
- Explanation: This error occurs when the
prompt_dataparameter contains invalid JSON syntax, preventing it from being parsed correctly. - Solution: Ensure that the JSON string in the
prompt_dataparameter is correctly formatted. Use a JSON validator to check for syntax errors and correct them before inputting the data.
Missing Sections
- Explanation: This issue arises when the
sectionskey is missing or empty in theprompt_data, leading to an incomplete prompt structure. - Solution: Verify that the
prompt_dataincludes a validsectionskey with the necessary sections defined. If missing, use the default data structure as a template to add the required sections.
Empty Prompt Output
- Explanation: This problem occurs when all sections are disabled or contain no selected entries, resulting in an empty final prompt.
- Solution: Check that the sections you want to include in the final prompt are enabled and contain selected entries. Adjust the section settings in the custom UI to ensure they contribute to the final output.
