Visit ComfyUI Online for ready-to-use ComfyUI environment
Streamline prompt strings by removing unnecessary elements for concise, effective AI-generated art prompts.
The PromptCleanup node is designed to streamline and refine prompt strings by removing unnecessary or redundant elements, ensuring that the prompts are concise and effective. This node is particularly beneficial for AI artists who want to enhance the clarity and impact of their prompts without manually editing them. By automating the cleanup process, PromptCleanup helps maintain a high standard of prompt quality, which can lead to more accurate and aesthetically pleasing AI-generated art. The node's primary goal is to optimize prompt strings for better performance and results in AI art generation.
This parameter represents the input prompt string that you want to clean up. It is a multiline string, allowing you to input complex prompts with multiple lines. The default value is an empty string, and it serves as the primary input for the cleanup process.
This parameter determines the strategy for detecting elements within the prompt that need to be cleaned up. You can choose between "prioritize_words" and "prioritize_phrase," with the default being "prioritize_phrase." This choice affects how the node identifies and processes parts of the prompt for cleanup.
This parameter specifies the method used to match elements within the prompt. Options include "exact," "ignore_case," and "flexible," with "flexible" as the default. This setting influences the node's ability to recognize and clean up elements based on different matching criteria.
A boolean parameter that, when set to true, expands combinations within curly braces (e.g., {a|b}) into all indexed variants. If false, lines with braces are skipped from indexing. The default value is false, and this parameter helps manage complex prompt structures.
This parameter is a float that determines the probability of each cleanup action being applied. It ranges from 0.0 to 1.0, with a default value of 1.0, allowing you to control the likelihood of cleanup actions being executed.
An integer parameter used to initialize the random number generator for probabilistic cleanup actions. It ranges from 0 to 0xffffffffffffffff, with a default value of 0, ensuring consistent results across different runs if desired.
This parameter specifies the file containing a list of elements to be excluded from the prompt. The default file is "blacklist.txt," and it helps prevent certain words or phrases from being included in the final prompt.
A boolean parameter that, when set to true, reloads the wildcards and blacklist caches. The default value is false, and this option is useful for ensuring that the latest changes to these files are applied during the cleanup process.
The output parameter cleaned_string provides the refined version of the input prompt string after the cleanup process. It reflects the removal of unnecessary elements and the application of the specified cleanup strategies, resulting in a more concise and effective prompt.
detection_mode and matching_mode settings to find the best combination for your specific prompt structure and desired outcome.index_brackets parameter to manage complex prompt structures with curly braces, ensuring that all possible combinations are considered if needed.chance parameter to control the aggressiveness of the cleanup process, especially if you want to retain some variability in the prompt.detection_mode is not one of the accepted options.detection_mode is set to either "prioritize_words" or "prioritize_phrase."matching_mode is not one of the accepted options.matching_mode is set to "exact," "ignore_case," or "flexible."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.