ComfyUI  >  Nodes  >  ComfyUI-AI-Assistant >  Clean Prompt Tags

ComfyUI Node: Clean Prompt Tags

Class Name

clean_prompt_tags

Category
advanced/AI_Assistant/text
Author
JackEllie (Account age: 634 days)
Extension
ComfyUI-AI-Assistant
Latest Updated
7/26/2024
Github Stars
0.0K

How to Install ComfyUI-AI-Assistant

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

Run ComfyUI Online

Clean Prompt Tags Description

Streamline and tidy prompt tags for AI artists by removing duplicates and whitespace to improve tag management efficiency.

Clean Prompt Tags:

The clean_prompt_tags node is designed to help you streamline and tidy up your prompt tags, ensuring they are clean, organized, and free of redundancies. This node is particularly useful for AI artists who work with complex prompts and need to maintain clarity and efficiency in their tag management. By removing duplicate tags and unnecessary whitespace, the clean_prompt_tags node helps you create more effective and concise prompts, ultimately improving the quality and performance of your AI-generated art.

Clean Prompt Tags Input Parameters:

string

This parameter accepts the input text or list of tags that you want to clean. It can be a single string or a list of strings. The function will process this input to remove redundant commas, extra whitespace, and duplicate tags if specified. There is no minimum or maximum value for this parameter, but it should be a valid string or list of strings. The default value is an empty string.

remove_duplicate_tags

This boolean parameter determines whether duplicate tags should be removed from the input. When set to True, the node will eliminate duplicate tags, keeping only the first occurrence of each tag. This helps in maintaining a clean and unique set of tags. The default value is True.

Clean Prompt Tags Output Parameters:

string

The output is a cleaned and organized string of tags. This string will have redundant commas and extra whitespace removed, and if remove_duplicate_tags is set to True, duplicate tags will also be eliminated. The result is a more concise and effective set of tags that can be used in your AI art prompts.

Clean Prompt Tags Usage Tips:

  • Use the remove_duplicate_tags parameter to ensure your tags are unique and free of repetitions, which can help in generating more precise and varied AI art.
  • Regularly clean your prompt tags to maintain clarity and efficiency, especially when working with long and complex prompts.
  • Combine this node with other text processing nodes to further refine and optimize your prompts for better AI-generated results.

Clean Prompt Tags Common Errors and Solutions:

Invalid input type

  • Explanation: The input provided is neither a string nor a list of strings.
  • Solution: Ensure that the input is a valid string or a list of strings before passing it to the node.

Empty input

  • Explanation: The input provided is empty or null.
  • Solution: Provide a valid string or list of strings as input to the node.

Unexpected behavior with special characters

  • Explanation: Special characters in the input may cause unexpected behavior.
  • Solution: Ensure that the input does not contain special characters that could interfere with the cleaning process. If necessary, preprocess the input to remove or escape special characters.

Clean Prompt Tags Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-AI-Assistant
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.