Shuffle Videos List
The boring node your video training pipeline quietly needs
- videos
- videos
It's not for your finished videos
"Shuffle Videos List" is not a fancy effect node. It does exactly one thing: it takes the list of videos you hand it, scrambles the order, and hands the same list back - same clips, same content, new arrangement. In the menu it's plain and forgettable, and that's kind of the point. It belongs to ComfyUI's newer, still-experimental dataset side of the house, the one that powers the built-in trainer's video support. If you've never opened a training workflow, you may have scrolled right past it without a second thought.
When you'd actually reach for it
The classic use is dataset prep for training a video LoRA or fine-tune. You load a folder of clips with Load Video (from Folder), and that node hands you the clips in sorted filename order. If you feed that straight into your batching, every epoch sees clip a.mp4, then b.mp4, then c.mp4 - and models are extremely good at noticing "position in the batch," not just "content." If two consecutive clips happen to be near-duplicates, the model starts treating order as signal. Shuffle the list once and each epoch starts from a different arrangement, which is the whole reason training loops shuffle data: it stops the model from memorizing the sequence instead of the motion.
The node only reorders - it won't dedupe your clips, won't split train/validation, won't touch captions. (There's a sibling, "Shuffle Pairs of Video-Text," if you need the captions to follow along.) It's one step in a chain, not a magic fix.
How it works
Under the hood it's boring in the best way: it seeds numpy's RNG with your seed and runs a permutation over the list indices, then hands back videos[i] for each shuffled index. No decoding, no frame work, no re-encoding - the video items are lazy references, so the whole operation is effectively instant even on a folder full of long clips.
The inputs that matter
- videos - the list of
VIDEOitems to shuffle. This is where Load Video (from Folder) plugs in. - seed - a
INTfrom 0 up to 2^64-1, default 0. This is the only knob you'll touch. Same seed + same list in = same order out, every run. That's a feature when you're debugging: a bad run is reproducible.
Output: videos - the shuffled list, same length, same items. Wire it into whatever comes next in your dataset chain.
Gotchas
Where people get burned: the seed defaults to 0, and if you run a few shuffles on the same folder without changing it, you'll get the same "new" order every time. That's not the node being broken - it's the seed being constant. Bump it (or wire in a "Random Number" generator) if you actually want variety across runs.
One more thing to know: it's flagged experimental, which in ComfyUI-speak means the API can shift under you without warning. It landed in mid-2026 alongside the video dataset/trainer refresh, so treat it as useful but not yet a stable contract - and don't build a workflow so dependent on it that you can't adapt.
It ships with ComfyUI core. Nothing to install, no model files. If you're training video, this is the node you didn't know you wanted - until your epochs start coming out with the same order every time.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| videos | VIDEO | List of videos to shuffle. | |
| seed | INT | 00–18446744073709550000 | Random seed. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| videos | VIDEO | Shuffled videos |