Nodes/comfyui-lumi-tools/Lumi Shuffle Prompt
ComfyUI Node

Lumi Shuffle Prompt

Shuffle your tag order so a fixed seed stops meaning fixed output

By illuminatianon·Created 9 months ago·Updated 4 months ago· 0
Lumi Shuffle Prompt
    • shuffled text
    text
    seed0

    Same prompt, same seed, same image - that's the deal, until you shuffle the order of the prompt itself. Lumi Shuffle Prompt exists to break that monotony: it takes your prompt text, scrambles the token order, and hands back a rearranged version. Wire it between your prompt source and your text encoder, and the same content can generate genuinely different compositions without you changing a word.

    The mechanism is exactly what the README says: it strips newlines and commas, splits the remaining text on spaces, shuffles with a seeded RNG, and rejoins with single spaces. That means a red car, city street, sunset becomes something like street sunset red a city car - order scrambled, words preserved.

    Whether that's a feature depends on what model you're feeding. This is where the model-family split in modern prompting really bites. On the SDXL/booru-tag lineage (Illustrious, NoobAI, Pony), tag order has only mild effect and shuffling is a cheap way to get variants from a fixed seed. On LLM-encoded models where "your prompt is an instruction, not a token bag," shuffling changes the meaning - "a red car" and "car a red" are different instructions, and you'll often get visibly worse or broken results. The node doesn't know which world you're in; you do.

    The inputs that matter

    • text - the prompt to shuffle (multiline).
    • seed - the shuffle seed. Same text + same seed = same shuffled order, every time. Change it to roll a different arrangement.

    Output: shuffled text, a single STRING you can feed into your encoder, a wildcard processor, or straight to the LLM prompt processor for enhancement.

    Installing

    cd ComfyUI/custom_nodes
    git clone https://github.com/illuminatianon/comfyui-lumi-tools
    cd comfyui-lumi-tools
    uv sync
    

    Restart ComfyUI, or grab "Lumi Tools" from ComfyUI Manager.

    The gotchas

    Three practical notes. First, the shuffling is word-level, not tag-level - commas get removed, so multi-word tags like cyberpunk city travel as a unit, but a comma-separated list loses its structure. If you rely on comma boundaries, shuffle the result downstream of your structure, not before. Second, keep the seed wired to your workflow-wide seed (Lumi Seed works great here) so the whole graph advances coherently. Third, and this is the one that gets people: if you're on an LLM-encoded model, test the shuffled output on a fixed seed before you trust it - a scrambled instruction can quietly produce garbage that looks fine in the prompt box.

    CategoryLumi/Prompt

    Inputs (2)

    NameTypeDefaultDescription
    textSTRINGThe prompt text to shuffle.
    seedINT00–18446744073709550000Random seed for shuffling.

    Outputs (1)

    NameTypeDescription
    shuffled textSTRING