ComfyUI Node

PromptDeDupe

Old name, same smart prompt cleaner

By Carasibana·Created 8 months ago·Updated 6 months ago· 2
PromptDeDupe
    • cleaned_string
    • removed_items
    • duplicate_count
    input_string
    prose_threshold4
    force_underscoresfalse
    prefer_specified_weightstrue
    remove_spaces_around_commastrue

    PromptDeDupe is the pre-v1.3.3 name for ComfyUI-PromptDrafter's deduplication node. In that update the pack moved every node to a Name_PromptDrafter scheme to prevent class-name collisions with other packs, so the current, menu-visible node is DeDupe_PromptDrafter (displayed as "Prompt De-Dupe - PromptDrafter"). The old key is still registered as a deprecated shim - same code, marked DEPRECATED, hidden from the Add Node menu - so that workflows saved before the rename load without a missing-node error.

    So this page is effectively an alias for the dedupe engine. Feed it a prompt string that's picked up duplicates - from stacking templates or combining LoRA trigger tags - and it removes repeated tags and phrases, resolving weight conflicts (explicit :1.2 weights beat implicit 1.0s), handling BREAK/AND zones separately, and protecting wildcards, <lora:...> references, scheduling syntax, and nested brackets from being mangled. The interface is unchanged: input_string in, prose_threshold (1–20, default 4) and the force_underscores / prefer_specified_weights / remove_spaces_around_commas toggles, and cleaned_string, removed_items, and duplicate_count out. Use cleaned_string; check removed_items if you don't trust a merge.

    What to do

    If a legacy workflow loads it, it works as-is - that's what the shim is for. If you're rebuilding or just dislike living on a compatibility path, swap it for DeDupe_PromptDrafter; the inputs and outputs match exactly, so it's a re-wire, not a rethink. Nothing about dedupe behavior changed in the rename.

    Installing

    The pack installs it: ComfyUI Manager (search "PromptDrafter") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Carasibana/ComfyUI-PromptDrafter
    

    Restart after - no dependencies beyond ComfyUI, no model downloads. New workflows should just search DeDupe_PromptDrafter.

    CategoryPromptDrafter

    Inputs (5)

    NameTypeDefaultDescription
    input_stringSTRING
    prose_thresholdINT41–20
    force_underscoresoptBOOLEANfalse
    prefer_specified_weightsoptBOOLEANtrue
    remove_spaces_around_commasoptBOOLEANtrue

    Outputs (3)

    NameTypeDescription
    cleaned_stringSTRING
    removed_itemsSTRING
    duplicate_countINT