Visit ComfyUI Online for ready-to-use ComfyUI environment
Streamline tag management by replacing tags based on similarity percentage for AI artists' dataset standardization and accuracy.
The TagReplace
node is designed to streamline and enhance your tag management process by replacing specific tags within a given set of tags based on a matching percentage. This node is particularly useful for AI artists who need to standardize or update tags in their datasets. By normalizing tags (converting them to lowercase and replacing spaces with underscores), the node ensures consistency and accuracy. It then compares each tag against a list of replacement tags, selecting the best match based on category similarity. If a match meets or exceeds a specified threshold, the original tag is replaced; otherwise, it remains unchanged. Additionally, any replacement tags not found in the original set are appended to the result, ensuring comprehensive tag coverage.
This parameter takes a string of tags separated by commas. These are the original tags that you want to process and potentially replace. The tags will be normalized by converting them to lowercase and replacing spaces with underscores. This ensures that the tags are in a consistent format for comparison. There is no minimum or maximum value for this parameter, but it should be a valid string of tags.
This parameter takes a string of replacement tags separated by commas. These tags will be used to replace the original tags if a match is found. Like the tags
parameter, these tags will also be normalized. The node will compare each original tag against these replacement tags to find the best match based on category similarity. There is no minimum or maximum value for this parameter, but it should be a valid string of tags.
This parameter is a numerical value that specifies the minimum match percentage required for a replacement to occur. The match percentage is calculated based on the similarity of tag categories. If the best match percentage for a tag meets or exceeds this value, the original tag will be replaced with the best matching replacement tag. The default value is typically set to ensure a reasonable level of similarity, but you can adjust it based on your specific needs.
The output parameter is a string that contains the processed tags, separated by commas. This string includes the original tags, with some potentially replaced by the best matching replacement tags based on the specified match percentage. Additionally, any replacement tags that were not found in the original set are appended to the result. This ensures that all relevant tags are included in the final output.
tags
and replace_tags
parameters are well-defined and relevant to your dataset to achieve the best results.match
parameter to fine-tune the sensitivity of tag replacement. A higher value will result in fewer replacements, while a lower value will allow more replacements.tags
and replace_tags
parameters are strings of tags separated by commas.match
parameter to allow for more replacements or review the replacement tags to ensure they are relevant.tags
and replace_tags
parameters to ensure the node can process them correctly.© Copyright 2024 RunComfy. All Rights Reserved.