ComfyUI > Nodes > ComfyUI-EreNodes > Prompt Filter

ComfyUI Node: Prompt Filter

Class Name

ErePromptFilter

Category
EreNodes
Author
Erehr (Account age: 3928days)
Extension
ComfyUI-EreNodes
Latest Updated
2025-08-11
Github Stars
0.06K

How to Install ComfyUI-EreNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-EreNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-EreNodes 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Prompt Filter Description

ErePromptFilter refines text prompts by mapping and replacing aliases with canonical tags.

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.

Prompt Filter Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-EreNodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.