Random Node
The Node That Shuffles Your Wires Every Time You Hit Queue
- output0
First, an apology on behalf of this pack's naming. The comfy.icu page says "Random Node," the GitHub repo is called comfyui-ramdom-node-39 (yes, "ramdom" - the typo is part of the URL), and the README has since been renamed to describe the node as Dynamic Routes. They're all the same thing: one tiny utility node that randomly reshuffles the order of the wires running through it every time you queue a prompt.
That's the whole point, and it's weirder and more useful than it sounds. Say you've got three LoRA loaders, three prompt sources, or three sampler setups feeding one KSampler, and you want each generation to grab a different one at random. Wire all the sources into this node's left side, wire the same number of targets out the right, and every time you hit Queue it re-randomizes which source lands on which target. It's a reroll for routing - not for seeds, not for prompts. The README credits ComfyUI-Inspire-Pack as the inspiration, and that's exactly the family it belongs to: a small graph-shaping utility rather than a generator.
How it actually works
Here's the part people get wrong: the Python class does nothing. It's a virtual passthrough that declares a wildcard * input and a wildcard output0 output and then sits there. Every bit of the behavior lives in the pack's frontend JavaScript (js/index.js). When you add the node, a handler watches your connections and grows or shrinks its input/output slots to match whatever you attach, adopting the type of the first connected wire and coloring the links to match. Then it subscribes to ComfyUI's promptQueued event: the moment you click Queue, it disconnects every input wire, Fisher-Yates-shuffles the order, and reconnects in a new random permutation.
That means no server-side execution, no model, no API call - the whole thing is a few dozen lines of browser code.
Inputs and outputs
The schema is deliberately minimal because the node builds its own interface: a single wildcard * input and a single output0 output in the manifest, which expand into as many slots as you connect. You don't set anything - the few fields there are have no names to learn. Connect wires, and the node becomes a pass-through whose mapping changes each run. It's not an output node, so you wire its outputs straight into whatever consumes them.
Installing it
Zero friction, honestly - the pack has no requirements.txt, no Python dependencies, no model files, no keys.
cd ComfyUI/custom_nodes
git clone https://github.com/shinich39/comfyui-ramdom-node-39
Then restart ComfyUI (or reload the frontend so the JS extension registers). You can also use ComfyUI Manager - search for "ramdom," "random node," or "dynamic routes," because the pack is registered under more than one name across the registries.
Where people get burned
- It shuffles on every queue, unconditionally. There's no toggle, no seed, no "shuffle once" mode. If you want a run to keep the current wiring, you have to bypass or delete the node. There is no way to pin a permutation.
- The rename trap. Old workflows and shared graphs may reference this node by a name your current install doesn't show. If a graph loads "missing node: Random Node," look for Dynamic Routes in the utils menu instead - same node.
- It's pure frontend, so it's fragile. This is exactly the kind of node that ComfyUI's frontend rewrites (the Nodes 2.0 overhaul broke several JS-heavy packs) can quietly break. If a ComfyUI update makes it stop shuffling, that's the usual suspect, not your config.
- Keep like types together. The node takes the type of the first connected input and applies it to all slots, so mixing image wires and latent wires through one instance is asking for mismatches.
- A small timing quirk: the connections handler installs itself about three seconds after you add the node, so it's normal for the slot-growing behavior to be briefly absent right after placement.
Honest verdict: if you just want random prompts or random LoRAs, a prompt randomizer or Inspire Pack will cover you. Reach for this one specifically when you want the wiring itself to be the thing that rolls the dice - it does that one job and does it silently.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output0 | * | — |