PromptMix
Shuffle or reverse a prompt's tags to test how much order actually matters
- STRING
PromptMix is the pack's order-shuffler: it splits a prompt on a delimiter and either shuffles the tags randomly, reverses them, or leaves them alone. It's a stress test in node form. Because on the CLIP-encoded models this pack targets, tag order genuinely matters - earlier tags get stronger attention - a shuffled prompt is a quick way to see how much of your result is the tags themselves versus the arrangement you happened to type them in.
How it works
Split on the delimiter, then apply the mode:
Off- pass the prompt through untouched (the default).Mix-random.shuffle()the tag order.Inverse- reverse the order.
Rejoin with the same delimiter and return a STRING. The use_last boolean freezes the previous result instead of re-rolling, which is the pack's standard pattern for turning a random node into a stable one mid-experiment.
The natural loop is: Ranbooru pulls a random tag set → PromptMix shuffles it → CLIP Text Encode → sampler. Chain Mix with a few queue runs and you get a cheap sampling of how order-sensitive your checkpoint and prompt are. The inverse mode is more of a debugging tool - flip a prompt around and if the result barely changes, your model is treating the tags as a bag of words; if it collapses, order was doing real work and the important tags should go first.
Inputs and outputs
prompt- STRING.delimiter- STRING, default,. Should match the prompt's actual separator.mix_type- enum:Off,Mix,Inverse. DefaultOff.use_last- BOOLEAN, default off. On = return the last mixed result.
Output: STRING, the mixed prompt.
Installing it
Part of the Ranbooru pack: ComfyUI Manager, search "Ranbooru", or
cd ComfyUI/custom_nodes
git clone https://github.com/Inzaniak/comfyui-ranbooru
then restart. No requirements.txt to fight - the pack imports only ComfyUI-bundled packages - and no model files.
Common issues
Because it's a random node (it reports itself as always-dirty), it re-shuffles on every queue run. That's the point, but it's also the thing that surprises people: flip use_last on when you finally like the arrangement and want it to stay put. Same separator mismatch warning as its siblings - if your prompt uses , but the delimiter is ,, you'll shuffle leading spaces into the mix and every tag picks up a stray space. And the honest limit: this is a tag-order tool for the comma-tag / SDXL-anime world. Feed it a sentence-style prompt for an LLM-encoded checkpoint and "mixing" a sentence is mostly meaningless - order still matters, but the unit of shuffling there isn't a comma token.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| delimiter | STRING | , | — |
| mix_type | COMBO | Off | 3 options: Off, Mix, Inverse |
| use_last | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |