ComfyUI > Nodes > ComfyUI Level Pixel > Tag Replace [LP]

ComfyUI Node: Tag Replace [LP]

Class Name

TagReplace|LP

Category
LevelPixel/Tags
Author
LevelPixel (Account age: 647days)
Extension
ComfyUI Level Pixel
Latest Updated
2026-02-24
Github Stars
0.03K

How to Install ComfyUI Level Pixel

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

Run ComfyUI Online

Tag Replace [LP] Description

The `TagReplace|LP` node replaces tags in a set by matching and substituting based on similarity.

Tag Replace [LP]| Tag Replace [LP]:

The TagReplace| Tag Replace [LP] node is designed to facilitate the replacement of tags within a given set of tags based on similarity and matching criteria. This node is particularly useful for AI artists who need to manage and manipulate large sets of tags efficiently. By comparing the categories of each tag, the node identifies the best match from a list of replacement tags and substitutes it if the match percentage exceeds a specified threshold. This process helps in maintaining consistency and relevance in tag usage, ensuring that the tags align closely with the desired categories or themes. The node's ability to normalize and compare tags based on their categories makes it a powerful tool for refining and optimizing tag sets in creative projects.

Tag Replace [LP]| Tag Replace [LP] Input Parameters:

tags

This parameter represents the initial set of tags that you want to process. It is a string where tags are separated by commas or new lines. The node will normalize these tags by converting them to lowercase and replacing spaces with underscores, which helps in standardizing the tags for comparison. There is no explicit minimum or maximum value for this parameter, but it should contain the tags you wish to evaluate and potentially replace.

replace_tags

This parameter is a string containing the tags that you want to use as potential replacements. Similar to the tags parameter, these tags are separated by commas or new lines and are normalized for comparison. The node will attempt to match these replacement tags with the original tags based on category similarity. The effectiveness of the replacement process depends on the relevance and diversity of the tags provided in this parameter.

match

The match parameter is a float that sets the threshold for the match percentage required to replace a tag. It determines how closely a replacement tag must match an original tag's categories to be considered a suitable replacement. The default value is 0.3, meaning that a replacement tag must have at least a 30% category match to replace an original tag. Adjusting this value allows you to control the strictness of the replacement process, with higher values requiring more precise matches.

Tag Replace [LP]| Tag Replace [LP] Output Parameters:

result

The output parameter result is a string that contains the final set of tags after the replacement process. It includes the original tags that were not replaced and the replacement tags that met the match criteria. This output provides a refined and optimized set of tags that align more closely with the desired categories, enhancing the consistency and relevance of your tag set.

Tag Replace [LP]| Tag Replace [LP] Usage Tips:

  • Ensure that the replace_tags parameter contains a diverse and relevant set of tags to maximize the effectiveness of the replacement process.
  • Adjust the match parameter to fine-tune the strictness of tag replacement. A higher value will result in more precise matches, while a lower value allows for broader replacements.
  • Use normalized tags (lowercase and underscores) to ensure consistency and improve the accuracy of the matching process.

Tag Replace [LP]| Tag Replace [LP] Common Errors and Solutions:

Invalid tag format

  • Explanation: This error occurs when the tags are not properly formatted, such as missing commas or incorrect normalization.
  • Solution: Ensure that all tags are separated by commas or new lines and are properly normalized (lowercase and underscores).

No matching replacement found

  • Explanation: This error indicates that none of the replacement tags met the match percentage threshold.
  • Solution: Consider lowering the match threshold or expanding the replace_tags list to include more diverse options.

Empty result set

  • Explanation: This error occurs when both the original and replacement tag sets are empty or improperly formatted.
  • Solution: Verify that both tags and replace_tags parameters contain valid and properly formatted tags.

Tag Replace [LP] Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Level Pixel
RunComfy
Copyright 2025 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 Models, enabling artists to harness the latest AI tools to create incredible art.