Append Tags
Two tag lists, one deduped string — the node that merges without duplicating
- string
If you've ever pasted two tag lists into one prompt and then spent ten minutes hunting for the duplicate 1girl, this is the node that fixes it. Append Tags takes two comma-separated strings, merges them, and removes any tags that appear in both - you wire your base prompt into front, your extra style or LoRA-trigger tags into back, and get a single clean string out the other end.
The mechanism is plain and it shows in the source. The pack's string_to_tags helper splits each input on commas and strips whitespace, so front and back are both turned into tag lists. The two lists get concatenated, pushed through a Python set() to drop duplicates, and rejoined with ", " via tags_to_string. That's the whole thing - no ML, no model files, nothing that could break on an update.
Two inputs, one output, and both matter:
- front - your first tag list (usually the base prompt).
- back - the tags to append on top.
- string - the merged, deduplicated result, ready to wire into a CLIP Text Encode node.
Here's the one honest gotcha: deduplication uses a set, and Python sets don't preserve order. The node's description says "Append comma-separated tags and remove duplicates," and it does exactly that, but if you feed it a carefully ordered list, the output order isn't guaranteed to match what you typed. Some models are sensitive to early prompt tokens, so if you're relying on specific tag order, check the output string once before you bake it into a workflow. For anything where order doesn't matter - merging a character block with a quality block, gluing a LoRA trigger onto a base prompt - you won't notice.
Where this lives in the wider graph: it's plumbing, pure and simple. ComfyUI workflows are maybe 70% nodes that touch no pixels (the KB's node-plumbing doc calls this layer out explicitly), and tag-string nodes like this are the workhorses of that layer for anyone doing anime or tag-based prompting. You reach for it when you're composing prompts from saved fragments instead of retyping them.
Installation is the same as the rest of the pack. ComfyUI Manager: Install Custom Nodes, search ComfyUI-FairLab, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/yanhuifair/ComfyUI-FairLab.git
cd ComfyUI-FairLab
pip install -r requirements.txt
Restart ComfyUI, double-click the canvas, and search "Append Tags" or "merge tags". The pack's dependencies here are minimal - nothing in this node needs opencv or the translate library, so if you only touch the string nodes you'll probably never hit the heavier deps.
If the node doesn't show up, the usual suspects apply: you didn't restart, or the console shows an import error from ComfyUI-FairLab. Check pip list | grep -E "opencv|googletrans|perfect-pixel" to confirm the pack's install ran. There's nothing exotic about troubleshooting this one - it either imports or it doesn't.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| front | STRING | — | |
| back | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |