prompt - dup (adv)
Two flavors of dedupe, one node
- STRING
- STRING
Plain prompt - dup dedupes a tag list as one flat string. But a lot of people structure their prompts as multiple lines - one line per block: subject, then style, then quality tags, line breaks doing the grouping. Running that through flat dedupe would mix everything together. prompt - dup (adv) is the version that respects your line structure, and it hands you both results at once.
This is the advanced sibling in the ymc pack's text family: same dedupe logic as prompt - dup, but it processes each line separately and gives you two STRING outputs so you can pick the form you want.
How it works
The node splits your text on newlines, dedupes each line independently (first occurrence wins, order preserved), then rebuilds. Output 1 is that per-line deduped result rejoined and flattened onto one line; output 2 is the per-line deduped result kept as multiple lines.
In practice:
- Output
STRING(the first) - deduped across the whole prompt, on a single line. Good for feeding straight into a CLIP Text Encode or a prompt stack that expects flat text. - Output
STRING(the second) - deduped within each line, newlines preserved. Good when the line grouping is meaningful to you and you want to keep editing it as blocks.
Which one you grab is your call - both come out of a single run, so there's no cost to wiring both into a UI or previewing both.
Inputs and outputs
text- your multi-line prompt- Output 1
STRING- whole-prompt dedupe, flattened to one line - Output 2
STRING- per-line dedupe, line structure preserved
Same dedupe semantics as the non-adv version: comma-split, exact string match, first occurrence kept. Whitespace still matters - masterpiece with a trailing space is a different string than masterpiece, so normalize with prompt - std upstream if you're chasing a stubborn duplicate.
Installing it
It's part of ymc-node-suite-comfyui, installed once for the whole pack:
- ComfyUI Manager → search
ymc-node-suite-comfyui→ Install → restart, or
cd ComfyUI/custom_nodes
git clone https://github.com/YMC-GitHub/ymc-node-suite-comfyui
restart. Manual clones also need pip install -r requirements.txt - the pack pulls in four tiny yors_* helper libraries and the auto-install is commented out in the source, so skipping this step leaves you with an empty node list. No models, no GPU.
Find it by searching prompt / dup on the canvas or via the right-click ymc suite menu.
Common issues
- "Both outputs look the same." If your input is already one line, they will be - the second output only differs when newlines are present. Multi-line input is the point of this node.
- Per-line means per-line. A tag duplicated across two different lines will survive in both, because each line is deduped on its own. If you want a global dedupe regardless of lines, that's the plain
prompt - dupoutput - output 1 here actually gives you the flat version, so you can treat this node as "both dedupes at once." - WAS Node Suite overlap. If you also run WAS nodes you may see "Conflicted Nodes" warnings on the pack's io/save nodes - unrelated to this one, but a common sight when the two packs coexist.
If you mainly work with flat comma lists, you probably don't need the advanced version - the plain prompt - dup is simpler. Reach for this one the moment your prompts are organized as lines and you want dedupe without flattening.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |
| STRING | STRING | — |