Reorder List
Because Your Prompt Batch Is Begging to Be Shuffled
- list_items
- list_items
If you've used Skoogeer-Noise's mustache templating, you know its output is a list of rendered prompts - and lists, it turns out, need reordering. Reorder List is the pack's generic utility for that: it takes any list-valued socket and either reverses it or applies a seeded shuffle, preserving the item type. It's a two-knob node with one job, and it does it well.
The reason you care is batch order. When Mustache Template expands {{haircolor}} into six prompts, they come out in a fixed Cartesian order. That's fine for iteration, but it means adjacent prompts always share structure, and if you're rendering frames or animation loops you often want a random-looking order that's still deterministic - a shuffle with a fixed seed gives you that. The same node works on any list, not just strings: MUSTACHE_VARIABLE_LIST, image lists, whatever you've got, because it never cares what the items are.
How it works
The node is list-aware (INPUT_IS_LIST), so it sees the full batch rather than one item. In shuffle mode it uses Python's random.Random(seed) to produce a seeded permutation - same seed, same order, every run. In reverse mode it just flips the list and ignores the seed entirely. There's no hidden magic and no re-sampling: the output is always a reordering of exactly the items you put in.
The inputs that matter
list_items- the list-valued socket to reorder.mode-shuffle(seeded random permutation) orreverse(flip the order).seed- only used inshufflemode. Keep it fixed for reproducibility; change it to get a different order.
Output is list_items again, same type, same length, new order.
Installing it
Part of Skoogeer-Noise. Manager → search "Skoogeer-Noise", or:
cd ComfyUI/custom_nodes
git clone https://github.com/ttulttul/Skoogeer-Noise
Restart ComfyUI. Deps are torch, numpy>=1.26, einops, pyyaml>=6.0.3 - all standard, no model downloads.
Common gotchas
The one thing that trips people: it expects a list-valued input, so if you connect a scalar, you get a one-item list back - effectively a no-op that changes the socket type. If your intent was shuffling the items within each rendered prompt, that's not this node; that's a different tool entirely. And remember the shuffle is deterministic per seed - if you're not seeing "random" variety, that's correct behavior, not a bug. Bump the seed.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| list_items | * | List-valued input to reorder. The node preserves the item type and returns a reordered list. | |
| mode | COMBO | shuffle | Reordering strategy. 'shuffle' applies a seeded random permutation. 'reverse' flips the list order. |
| seed | INT | 00–18446744073709550000 | 64-bit seed used when mode is shuffle. The same seed yields the same permutation. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| list_items | * | — |