Visit ComfyUI Online for ready-to-use ComfyUI environment
Efficiently removes duplicate words from text prompts, preserving original case and specific terms through customizable whitelist.
PromptDupeRemoverV2 is a sophisticated node designed to enhance text processing by eliminating duplicate words from a given input. This node is particularly beneficial for AI artists and content creators who need to refine and streamline their text prompts, ensuring clarity and uniqueness. By leveraging advanced text parsing techniques, PromptDupeRemoverV2 efficiently identifies and removes repeated words, while offering options to preserve the original case of the text and to maintain specific terms through a customizable whitelist. This functionality is crucial for maintaining the integrity of creative prompts, allowing users to focus on the originality and impact of their content without the distraction of redundancy.
The text
parameter is the primary input for the node, where you provide the string of text from which duplicates need to be removed. This parameter supports multiline input, allowing you to process extensive text blocks. The effectiveness of the node's duplicate removal process hinges on the content provided in this parameter, as it directly influences the output's clarity and conciseness.
The preserve_case
parameter is a boolean option that determines whether the original case of the text should be maintained during processing. By default, this is set to True
, meaning the node will retain the original capitalization of words. This is particularly useful when the case of words carries significance, such as in proper nouns or stylistic choices. If set to False
, the node will convert all words to lowercase, which can be useful for uniformity in certain contexts.
The whitelist
parameter allows you to specify a list of terms that should be exempt from duplicate removal. This is a string input where terms are separated by commas, and multi-word terms should be enclosed in quotes. This feature is essential for preserving specific words or phrases that are intentionally repeated for emphasis or stylistic reasons. By default, this parameter is an empty string, meaning no terms are whitelisted unless specified.
The output of the node is a single STRING
type, which is the cleaned version of the input text with duplicates removed. This output retains the structure and flow of the original text while ensuring that each word appears only once, unless specified otherwise by the whitelist. The cleaned text is crucial for creating concise and impactful prompts, free from unnecessary repetition.
whitelist
parameter to protect specific terms or phrases that are crucial to your prompt's meaning or style, ensuring they are not removed during processing.preserve_case
to False
if you require a uniform text case, which can be beneficial for certain types of text analysis or when case sensitivity is not a concern."term1", "multi word term2"
.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.