🐳Prompt管理器:
The CustomPromptManagerWithNegative node is designed to manage and categorize prompts into positive and negative types, allowing for dynamic control over the number and content of prompts. This node is particularly beneficial for AI artists who wish to fine-tune their creative outputs by specifying prompts that should be emphasized or de-emphasized. By supporting both positive and negative prompt classifications, it provides a nuanced approach to prompt management, enabling users to apply weights to prompts and combine them effectively. This functionality is crucial for generating more refined and targeted AI-generated art, as it allows for the precise adjustment of prompt influence based on user preferences.
🐳Prompt管理器 Input Parameters:
prompts_json
The prompts_json parameter is a JSON-formatted string that contains a list of prompts, each defined by attributes such as text, enabled status, weight, and type. This parameter is essential as it provides the raw data that the node processes to categorize and weight prompts. The JSON structure should include each prompt as a dictionary with keys like text, enabled, weight, and type. The text key holds the prompt content, enabled is a boolean indicating if the prompt should be used, weight is a numerical value that adjusts the prompt's influence, and type specifies whether the prompt is positive or negative. Properly structuring this JSON input is crucial for the node to function correctly.
use_weights
The use_weights parameter is a boolean that determines whether the weights specified in the prompts_json should be applied to the prompts. When set to True, the node will adjust the influence of each prompt based on its weight, allowing for more granular control over the prompt's impact on the final output. If set to False, all prompts will be treated equally, regardless of their specified weight. This parameter is important for users who want to emphasize certain prompts more than others.
separator
The separator parameter is a string that defines the character or sequence of characters used to join the combined prompts into a single string. This parameter allows users to customize how the final output of combined prompts is formatted, which can be useful for ensuring compatibility with other systems or for aesthetic preferences. The default value is typically a comma or space, but it can be adjusted to suit specific needs.
🐳Prompt管理器 Output Parameters:
positive_combined
The positive_combined output is a single string that contains all the positive prompts combined, separated by the specified separator. This output is crucial for users who want to generate content that emphasizes certain positive aspects or themes. The combined string reflects the weighted influence of each positive prompt, providing a tailored input for AI models.
negative_combined
The negative_combined output is a single string that contains all the negative prompts combined, separated by the specified separator. This output is used to de-emphasize or counteract certain themes or aspects in the generated content. By providing a separate output for negative prompts, users can effectively manage and balance the influence of different prompt types in their creative process.
🐳Prompt管理器 Usage Tips:
- Ensure that the
prompts_jsonis correctly formatted and includes all necessary attributes for each prompt to avoid processing errors. - Use the
use_weightsparameter to fine-tune the influence of each prompt, especially when certain prompts need to be more prominent in the final output. - Customize the
separatorto match the requirements of your downstream processes or personal preferences for prompt formatting.
🐳Prompt管理器 Common Errors and Solutions:
JSON解析错误
- Explanation: This error occurs when the
prompts_jsoninput is not properly formatted as valid JSON. - Solution: Verify that the JSON string is correctly structured, with all necessary punctuation and syntax, and that each prompt is defined as a dictionary with the required keys.
处理错误
- Explanation: A general error that may occur due to unexpected issues during prompt processing.
- Solution: Check the input parameters for any inconsistencies or invalid values, and ensure that all prompts are correctly defined and enabled if they are intended to be used.
