Prompt Filter:
The ErePromptFilter node is designed to process and refine text prompts by filtering and mapping them according to predefined rules and data. This node is particularly useful for AI artists who need to manage and manipulate large sets of text prompts efficiently. By leveraging CSV files containing tag data, the ErePromptFilter can transform and standardize prompts, ensuring consistency and accuracy in text-based workflows. The node's primary function is to parse input prompts, identify and replace aliases with canonical tags, and return a refined list of tags. This capability is essential for maintaining a clean and organized prompt library, which can significantly enhance the quality and relevance of AI-generated content.
Prompt Filter Input Parameters:
prompt
The prompt parameter is a string input that represents the text prompt you wish to filter and process. This parameter is crucial as it serves as the primary data source for the node's operations. The prompt is converted to lowercase and any underscores are replaced with spaces to ensure uniformity. The node then splits the prompt into individual tokens based on commas and newline characters. These tokens are subsequently processed to identify and map any aliases to their canonical forms using the data from a specified CSV file. The effectiveness of the ErePromptFilter largely depends on the quality and structure of the input prompt, as well as the comprehensiveness of the alias and canonical mappings provided in the CSV file.
Prompt Filter Output Parameters:
result_tags
The result_tags output parameter is a list of strings that represents the refined and standardized tags derived from the input prompt. This output is the culmination of the node's filtering process, where each token from the input prompt is checked against the alias and canonical mappings. The result is a set of tags that are consistent and aligned with the predefined standards set in the CSV file. This output is particularly valuable for AI artists who require a clean and organized set of tags for further processing or integration into AI models. The result_tags ensure that the generated content is relevant and adheres to the desired thematic or stylistic guidelines.
Prompt Filter Usage Tips:
- Ensure that your CSV file containing tag data is well-structured and includes comprehensive mappings of aliases to canonical tags to maximize the effectiveness of the ErePromptFilter.
- Regularly update your CSV file to include new tags and aliases as your project evolves, ensuring that the node continues to provide accurate and relevant results.
- Use clear and concise prompts to minimize ambiguity and improve the accuracy of the filtering process.
Prompt Filter Common Errors and Solutions:
CSV file not found
- Explanation: This error occurs when the specified CSV file containing tag data cannot be located in the expected directory.
- Solution: Verify that the CSV file is correctly named and placed in the
__autocomplete__directory relative to the node's script location. Ensure that the file path is correctly specified in the node's configuration.
Invalid CSV format
- Explanation: This error arises when the CSV file does not adhere to the expected format, such as missing columns or incorrect data types.
- Solution: Check the CSV file to ensure it includes all necessary columns and that each row contains the expected number of fields. Correct any formatting issues and reload the file.
Prompt processing failure
- Explanation: This error can occur if the input prompt is empty or contains invalid characters that disrupt the filtering process.
- Solution: Review the input prompt to ensure it is not empty and does not contain unsupported characters. Adjust the prompt as needed and try again.
