Nodes/ComfyUI Archon Nodes/Merge General Tags
ComfyUI Node

Merge General Tags

Two tag lists in, one deduped list out — the boring node that prevents real pain

By esbe1175·Created 6 months ago·Updated 6 months ago· 1
Merge General Tags
    • general
    general_a
    general_b

    Nobody gets excited about a tag-merging node, and that's fine - you'll be excited about the hour it saves you. If you pull prompts from a live booru source, you end up with tag lists that overlap, contradict, and repeat themselves. MergeGeneralTags takes two comma-separated general-tag strings and returns one clean list: deduplicated, de-fuzzed, and formatted the way your anime model wants to read it.

    It's the pack's unglamorous utility, and it fills a genuinely annoying gap. Say you've got Booru Roulette's general output (the content tags from a real Gelbooru post) and a LoRA card's list of recommended tags. You want both in your prompt, but they'll overlap - long hair will be in both, and one source will write 1girl where the other wrote 1 girl. This node makes that collision disappear instead of contaminating your prompt with duplicates.

    How it works

    Mechanically it's simple and honest: split both inputs on commas, and build a deduped list where "the same tag" means normalized equality - case-insensitive, underscores collapsed to spaces, whitespace squashed, and escaped parentheses stripped for comparison. So long_hair, Long Hair, and long hair are all the same tag to it. First-seen order is preserved, which matters because earlier tags in a Danbooru-family prompt get stronger attention. Then each surviving tag is normalized on the way out - underscores to spaces, parentheses escaped - matching the format the rest of this pack produces.

    Two inputs, one output: general_a and general_b (both multiline strings) in, general out, ready to feed into PromptTagAssembler or straight into your prompt.

    Installing it

    Part of the comfyui-archon-nodes pack - one install, all five nodes. ComfyUI Manager → "Archon Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/esbe1175/comfyui-archon-nodes
    pip install -r ComfyUI/custom_nodes/comfyui-archon-nodes/requirements.txt
    

    Restart, and it's under Archon/Prompt. Pure Python, nothing to download.

    What it deliberately doesn't do

    It only merges the general bucket - character, series, and artist tags are deliberately kept out. That's a feature, not an omission: this pack's design keeps those categories separate precisely so that order-sensitive assembly (see PromptTagAssembler) can place them correctly. If you want to merge two character lists, you're meant to do it in that field, not here.

    It also won't reconcile contradicting tags - if one source says standing and the other says sitting, you get both, in order. That's a prompt-writing problem, not a string-joining one, and no merge node should pretend to solve it.

    This is a 300-word-article-size node, and it knows it. If you never combine two tag sources, skip it. If you do, it's the kind of tiny, deterministic helper that quietly removes a class of dumb mistakes from your workflow.

    CategoryArchon/Prompt

    Inputs (2)

    NameTypeDefaultDescription
    general_aSTRING
    general_bSTRING

    Outputs (1)

    NameTypeDescription
    generalSTRING