Visit ComfyUI Online for ready-to-use ComfyUI environment
Filter specific tags using regular expressions for AI art dataset refinement and content control.
The DanbooruTagsTransformerBanTagsFromRegex
node is designed to filter out specific tags from a dataset using regular expressions. This node is particularly useful for AI artists who want to refine their datasets by excluding certain tags that match a given pattern, thereby ensuring that the generated content aligns more closely with their creative vision. By leveraging regular expressions, this node provides a flexible and powerful way to specify complex patterns for tag exclusion, allowing for precise control over the dataset's content. This capability is essential for maintaining the quality and relevance of the data used in AI art generation, as it helps prevent unwanted or inappropriate tags from influencing the output.
The tokenizer
parameter is a crucial component that processes the input data. It is expected to be of type DART_TOKENIZER
, which is responsible for handling the tokenization of tags. This parameter ensures that the tags are correctly interpreted and processed by the node, allowing for accurate identification and exclusion of tags based on the specified patterns.
The patterns
parameter is a string input that defines the regular expressions used to identify tags that should be banned. This parameter supports multiline input, allowing you to specify multiple patterns, each on a new line. The default value is ".+ hair"
, which would match any tag containing the word "hair". By customizing these patterns, you can tailor the node's behavior to exclude specific tags that do not fit your desired criteria, enhancing the quality of your dataset.
The output of this node is a single STRING
that contains the list of banned tags, separated by commas. This output provides a clear and concise summary of the tags that have been excluded based on the specified patterns, allowing you to easily review and verify the effectiveness of the tag exclusion process.
patterns
parameter to match only the tags you wish to exclude. Test your patterns with sample data to ensure they perform as expected.patterns
parameter contains a malformed regular expression that cannot be processed.patterns
parameter for syntax errors and correct them. Use online regex testers to validate your expressions before using them in the node.tokenizer
parameter is not supplied, preventing the node from processing the tags.DART_TOKENIZER
is provided to the node. Check your workflow to confirm that the tokenizer is correctly initialized and passed to this node.© 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. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.