πΈ Sorter
Sort your tags into quality, subject, character, series and artist buckets
- sorted_prompt
- debug
Most people who end up on this node's page are holding a tag soup and suspecting it could be better. πΈ Sorter takes a comma-separated string of tags, sorts them into category buckets, and re-emits them in a conventional order - quality first, then subject, character, series, artist, and general tags last. It also dedupes along the way. It's the "make my prompt look like the ones that work" node.
The ordering matters on the anime SDXL lineage. The KB's prompt-engineering doc makes the point that comma-separated booru tags transferred cleanly to Illustrious, NoobAI, WAI, Pony v6 and Anima - and that the community converges on putting quality and subject words early, artist/style references in their own region, and general descriptors after. The sorter encodes that convention so you don't have to hand-arrange tags every time.
How it decides where a tag goes is the interesting part, because it's heuristics, not magic. From the source, _detect_category checks: is this a quality tag (best quality, masterpiece, highres)? A subject word (a hardcoded list of subject terms like 1girl, solo)? A character name? A series marker? An artist name - including the artist: prefix form and @artist form? A style term? Anything it can't classify falls into general. Each tag gets logged to the debug output with its bucket, which is the whole reason the debug string exists: it's the audit trail of the classification.
Inputs are minimal - one string_input - and outputs are sorted_prompt plus debug. You wire the string in, get the ordered, deduplicated string out.
Now the honest positioning, because the pack itself will tell you this: this node is deprecated. The README lists it alongside πΈ Merge, πΈ Wildcard Resolver, and πΈ Dedupe as superseded by πΈ Prompt Processor, which folds sorter + dedupe + merge + wildcard resolution into one node. Existing workflows keep working - that's a promise the pack makes for all deprecated nodes - but if you're building a fresh pipeline, Prompt Processor is the intended path. RibbitySorter still has a niche: if your workflow only needs tag ordering and nothing else, a single tiny sorter node is easier to read than a Processor with its toggle-gated inputs. It's a fine standalone utility, just not where the pack is heading.
One thing worth knowing about the dedupe behavior: it normalizes tags (lowercase, underscores to spaces) before comparing, so Long_Hair and long hair collapse to one entry rather than two near-duplicates fighting for attention in the prompt.
Installing it
Part of Frog Node Pack:
- ComfyUI Manager: search Frog Node Pack, install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/RabbitThatIsPink/FrogNodePack, restart, hard-refresh (Ctrl+Shift+R).
No extra pip dependencies - requirements.txt is empty; Pillow ships with ComfyUI. Find πΈ Sorter under πΈ Node Pack.
Common issues
The main thing people hit is a tag landing in a bucket they don't agree with - say, a character descriptor classified as general, or an artist name not recognized. That's the nature of heuristic classification; read the debug output to see what the sorter decided and why. There's no per-tag override here, so if a misclassification is hurting you, the pack's answer is the consolidated Prompt Processor or manual arrangement. Also remember it sorts tags but does not resolve wildcards - feed it already-resolved text, or chain it after a wildcard resolver.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| string_input | STRING | Wired string of tags to sort. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| sorted_prompt | STRING | β |
| debug | STRING | β |