ComfyUI > Nodes > DJZ-Nodes > Prompt Cleaner

ComfyUI Node: Prompt Cleaner

Class Name

PromptCleaner

Category
Custom-Nodes
Author
DriftJohnson (Account age: 4052days)
Extension
DJZ-Nodes
Latest Updated
2025-04-25
Github Stars
0.04K

How to Install DJZ-Nodes

Install this extension via the ComfyUI Manager by searching for DJZ-Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter DJZ-Nodes 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 Cleaner Description

Streamline text prompts by removing specified words or phrases for enhanced clarity and focus in AI-generated content.

Prompt Cleaner:

The PromptCleaner node is designed to streamline and refine text prompts by removing specified words or phrases, enhancing the clarity and focus of your input text. This node is particularly useful for AI artists who need to clean up prompts by eliminating unnecessary or repetitive words, ensuring that the core message is conveyed without distractions. By providing a straightforward method to filter out unwanted elements, the PromptCleaner helps maintain the integrity and intent of your text, making it an essential tool for those looking to optimize their creative workflows.

Prompt Cleaner Input Parameters:

text

This parameter represents the input text that you wish to clean. It can be a multiline string, allowing you to input longer passages or multiple lines of text. The text parameter is crucial as it serves as the primary content from which specified words or phrases will be removed. There are no specific minimum or maximum values for this parameter, but it should be a valid string.

words_to_remove

This parameter is a comma-separated string of words that you want to remove from the input text. It is case-insensitive and allows you to specify multiple words by separating them with commas. The default value is "man, woman, world", but you can customize it to fit your needs. This parameter directly impacts the output by determining which words will be filtered out from the text.

Prompt Cleaner Output Parameters:

STRING

The output of the PromptCleaner node is a cleaned version of the input text, returned as a single string. This output reflects the original text with the specified words or phrases removed, providing a more concise and focused version of the input. The cleaned text is essential for ensuring that your prompts are clear and free from unwanted elements, making it easier to convey your intended message.

Prompt Cleaner Usage Tips:

  • To effectively use the PromptCleaner, start by identifying common words or phrases in your text that do not contribute to the overall message and add them to the words_to_remove parameter.
  • Experiment with different combinations of words to remove to see how it affects the clarity and focus of your text, and adjust the list as needed to achieve the desired result.

Prompt Cleaner Common Errors and Solutions:

Invalid input text

  • Explanation: The input text provided is not a valid string or is empty.
  • Solution: Ensure that the text parameter is a properly formatted string and contains content to be processed.

Incorrect words_to_remove format

  • Explanation: The words_to_remove parameter is not formatted correctly, possibly due to missing commas or incorrect casing.
  • Solution: Verify that the words_to_remove parameter is a comma-separated list of words, and ensure that it is formatted correctly to match the intended words in the text.

Prompt Cleaner Related Nodes

Go back to the extension to check out more related nodes.
DJZ-Nodes
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 Playground, enabling artists to harness the latest AI tools to create incredible art.