ComfyUI > Nodes > comfyui_tag_filter > TagMerger

ComfyUI Node: TagMerger

Class Name

TagMerger

Category
text
Author
sugarkwork (Account age: 915days)
Extension
comfyui_tag_filter
Latest Updated
2024-08-02
Github Stars
0.02K

How to Install comfyui_tag_filter

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

TagMerger Description

Combine and normalize tags from different sources, removing duplicates and offering underscore control for standardized tagging.

TagMerger:

The TagMerger node is designed to combine two sets of tags into a single, unified list. This node is particularly useful for AI artists who need to manage and merge tags from different sources, ensuring that the resulting list is clean, consistent, and free of duplicates. The TagMerger node processes the input tags by normalizing them (e.g., converting to lowercase, replacing spaces with underscores) and then merging them while removing any duplicates. Additionally, it offers an option to control whether underscores are used in the final output. This functionality is essential for maintaining a standardized tagging system, which can significantly enhance the organization and retrieval of tagged content.

TagMerger Input Parameters:

tags1

This parameter accepts a string of tags separated by commas, periods, or new lines. It represents the first set of tags to be merged. Each tag will be normalized by converting it to lowercase and replacing spaces with underscores. The default value is an empty string.

tags2

Similar to tags1, this parameter accepts a string of tags separated by commas, periods, or new lines. It represents the second set of tags to be merged with the first set. Each tag will undergo the same normalization process. The default value is an empty string.

under_score

This boolean parameter determines whether underscores should be used in the final merged tags. If set to True, spaces in the tags will be replaced with underscores. If set to False, underscores will be replaced with spaces. The default value is True.

TagMerger Output Parameters:

result

The output parameter result is a string that contains the merged and normalized list of tags, separated by commas. This output is the result of combining tags1 and tags2, removing duplicates, and applying the specified underscore setting. The resulting string is ready for use in tagging systems or further processing.

TagMerger Usage Tips:

  • To ensure a clean and consistent tag list, always provide tags in a comma, period, or newline-separated format.
  • Use the under_score parameter to control the appearance of your tags based on your preference or the requirements of your tagging system.
  • When merging tags from different sources, make sure to review the final output to ensure that all necessary tags are included and correctly formatted.

TagMerger Common Errors and Solutions:

Empty tag list

  • Explanation: If both tags1 and tags2 are empty, the result will be an empty string.
  • Solution: Ensure that at least one of the input parameters (tags1 or tags2) contains valid tags.

Unexpected characters in tags

  • Explanation: Tags containing unexpected characters may not be properly normalized or merged.
  • Solution: Verify that the input tags are correctly formatted and only contain valid characters (letters, numbers, spaces, commas, periods, or new lines).

Incorrect underscore handling

  • Explanation: If the under_score parameter is not set correctly, the tags may not appear as expected.
  • Solution: Double-check the under_score parameter setting to ensure it matches your desired output format (True for underscores, False for spaces).

TagMerger Related Nodes

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