ComfyUI > Nodes > cgem156-ComfyUI🍌 > Ban Tags 🍌

ComfyUI Node: Ban Tags 🍌

Class Name

BanTags|cgem156

Category
cgem156 🍌/dart
Author
laksjdjf (Account age: 2852days)
Extension
cgem156-ComfyUI🍌
Latest Updated
2024-06-08
Github Stars
0.03K

How to Install cgem156-ComfyUI🍌

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

Ban Tags 🍌 Description

Filter unwanted tags from tokenizer vocab for AI art gen by specifying banned tags to exclude from output.

Ban Tags 🍌| Ban Tags 🍌:

The BanTags| Ban Tags 🍌 node is designed to help you filter out unwanted tags from a given tokenizer's vocabulary. This can be particularly useful in AI art generation where certain tags or keywords need to be excluded to maintain the desired quality or theme of the generated content. By specifying a list of tags to ban, the node ensures that any tags matching the provided patterns are identified and excluded from the output. This functionality is essential for maintaining control over the content and avoiding any undesired elements in your AI-generated art.

Ban Tags 🍌| Ban Tags 🍌 Input Parameters:

tokenizer

The tokenizer parameter expects a tokenizer object, specifically of type DART_TOKENIZER. This tokenizer is used to process and manage the vocabulary from which the tags will be filtered. The tokenizer's vocabulary is scanned to identify and exclude tags that match the patterns specified in the ban_tags parameter. This parameter is crucial as it provides the context and the set of tags that need to be filtered.

ban_tags

The ban_tags parameter is a multiline string where you can specify the tags you want to ban. Each line in this string represents a different tag pattern that will be compiled into a regular expression. These patterns are then used to match against the tags in the tokenizer's vocabulary. The impact of this parameter is significant as it directly determines which tags will be excluded from the output. There are no specific minimum or maximum values, but the patterns should be valid regular expressions.

Ban Tags 🍌| Ban Tags 🍌 Output Parameters:

STRING

The output parameter is a single string that contains the list of banned tags, separated by commas. This string represents the tags from the tokenizer's vocabulary that matched the patterns specified in the ban_tags parameter. The importance of this output lies in its ability to provide a clear and concise list of excluded tags, which can be used to verify that the unwanted tags have been successfully filtered out.

Ban Tags 🍌| Ban Tags 🍌 Usage Tips:

  • Ensure that the ban_tags parameter contains valid regular expressions to avoid any errors during the matching process.
  • Use the node to pre-process your tokenizer's vocabulary before generating content to maintain control over the tags used in your AI art.
  • Regularly update the ban_tags list to adapt to new unwanted tags that may appear in your tokenizer's vocabulary.

Ban Tags 🍌| Ban Tags 🍌 Common Errors and Solutions:

Invalid regular expression in ban_tags

  • Explanation: The ban_tags parameter contains an invalid regular expression.
  • Solution: Review the patterns in the ban_tags parameter and ensure they are valid regular expressions.

Tokenizer object not of type DART_TOKENIZER

  • Explanation: The tokenizer parameter is not a valid DART_TOKENIZER object.
  • Solution: Ensure that the tokenizer provided is of the correct type DART_TOKENIZER.

No tags matched the ban patterns

  • Explanation: None of the tags in the tokenizer's vocabulary matched the patterns specified in ban_tags.
  • Solution: Verify that the patterns in ban_tags are correct and that the tags you want to ban are present in the tokenizer's vocabulary.

Ban Tags 🍌 Related Nodes

Go back to the extension to check out more related nodes.
cgem156-ComfyUI🍌
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.