Nodes/Frog Node Pack/🐸 Dedupe
ComfyUI Node

🐸 Dedupe

Strip duplicate tags from a comma-separated prompt

By RabbitThatIsPinkΒ·Created 3 months agoΒ·Updated 24 days agoΒ· 1
🐸 Dedupe
    • deduped
    β—„textβ€”β–Ί

    Frog Dedupe is a single-purpose node with a single input: comma-separated tags in, deduplicated tags out. It's the smallest thing in the pack, and it exists because the pack's prompt chain used to produce duplicates as a side effect of merging. When you're gluing a library base prompt, a character name, a scene, and a tagger's output together, the same tag has a way of showing up twice - once from your base, once from the captioner. Feeding the merged mess through Dedupe collapses the repeats so your conditioning doesn't spend tokens on "1girl, 1girl, 1girl."

    That's the whole mechanism, and there's nothing clever hidden in it: one text input, one deduped output, no settings. If you're wondering whether it handles anything fancier than exact duplicates - near-misses like blue hair vs blue_hair, or synonyms - the honest answer is no. It's an exact-match dedupe, which is exactly the right scope for the problem it solves: the pack's own merge pipeline produces literal duplicates, and literal duplicates are all it needs to catch.

    The README is upfront that this one is deprecated - it's part of the old four-node chain (🐸 Merge β†’ 🐸 Wildcard Resolver β†’ 🐸 Sorter β†’ 🐸 Dedupe) that 🐸 Prompt Processor replaced in one node. The processor merges, resolves wildcards, sorts, and dedupes in a single step, so if you're building a new prompt pipeline, that's the modern path. Dedupe lives on for legacy workflows and for the "I only need this one step" case - and honestly, if you already have a merge elsewhere and just want deduping, a standalone node is still less to wrap your head around than the processor's toggle system.

    The input

    • text - comma-separated tags to deduplicate. That's the entire API. It's a single-line string input, so you're feeding it programmatically (from a merge, a tagger, or a Library) rather than typing a prompt in by hand.

    What comes out

    deduped - the same comma-separated string, with repeated tags removed. Order is otherwise left alone; if you need tags sorted as well as deduped, that was the Sorter node's job in the old chain, and the Prompt Processor does both.

    Installing it

    Part of Frog Node Pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/RabbitThatIsPink/FrogNodePack
    

    or ComfyUI Manager β†’ "Frog Node Pack". No extra dependencies.

    Where people trip

    There's one real gotcha, and it's the same one as Frog Merge: disconnected inputs are fine, but an empty-but-connected string still passes through. And don't expect whitespace intelligence - blue hair and blue hair (trailing space) may or may not be treated as equal depending on how the pack trims; if deduping looks like it's failing, a trailing-space mismatch is the first suspect. It's a thin utility, it's deprecated in favor of the processor, and it does exactly one thing without drama - sometimes that's all a workflow needs.

    Category🐸 Node Pack

    Inputs (1)

    NameTypeDefaultDescription
    textSTRINGComma-separated tags to deduplicate.

    Outputs (1)

    NameTypeDescription
    dedupedSTRINGβ€”