Nodes/ComfyUI-kewky_tools/Load Video Plus
ComfyUI Node

Load Video Plus

A video loader with a random-pick-from-folder trick

By KewkLWΒ·Created 2 years agoΒ·Updated about a year agoΒ· 9
Load Video Plus
  • video
  • output_video
  • output_mask
  • frame_count
β—„use_random_videofalseβ–Ί
β—„random_folder.β–Ί
β—„n_videos1β–Ί
β—„seed0β–Ί
β—„sortfalseβ–Ί
β—„loop_sequencefalseβ–Ί

Any video workflow starts the same way: get a clip off disk and turn it into a stack of frames ComfyUI can actually work on. That's what this does. Point Load Video Plus at a video, and it hands you the frames as an IMAGE batch - the exact shape a Wan / LTX vid2vid graph, an interpolation node, or a ControlNet-per-frame pipeline expects to eat. If you've used VHS's Load Video or the native loader, you know the base idea.

The "Plus" is one specific convenience: it can pull a random video out of a folder for you instead of you hand-picking one every time. Flip use_random_video on, give it a folder, and it grabs a clip (or a few) at random. That sounds like a small thing until you're running the same motion pipeline over a library of source clips and you don't want to babysit which one goes in - batch it, seed it, walk away.

How it works

A video is just frames plus timing. The node decodes the file into a tensor of frames and passes them out as an IMAGE batch, alongside a MASK track and a count of how many frames it read. Everything downstream - samplers, interpolators, upscalers - then treats those frames like any other image batch. The random-folder mode is a wrapper around that: instead of decoding one named file, it picks file(s) from a directory according to the seed and decodes those.

The inputs and outputs that matter

  • video - the clip to load. This is the normal path: one video in, its frames out.
  • use_random_video (default off) - the headline feature. On, and the node ignores the single file and pulls from a folder instead.
  • random_folder - the directory it draws from when random mode is on. Defaults to . (the current folder), which you almost certainly want to change to wherever your source clips actually live.
  • n_videos (1–10) - how many clips to grab in random mode. Bump it to feed several clips into one run.
  • seed - makes the random pick reproducible. Same seed, same folder, same clips - which matters when you find a good result and want it back.
  • sort and loop_sequence - order the grabbed clips deterministically, and loop the frame sequence back on itself, respectively. Both off by default.

Three outputs: output_video (IMAGE) is the frame batch - this is the one you wire onward; output_mask (MASK) carries an alpha/mask track for compositing; and frame_count (INT) is your frame total, handy to route into anything that needs to know the length, like a frame-rate or duration calc.

How to install it

  • ComfyUI Manager - search ComfyUI-kewky_tools, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/KewkLW/ComfyUI-kewky_tools.git, then restart.

The pack is a lightweight grab-bag of utility nodes with no heavy model downloads, so this one installs and loads instantly.

Common issues & troubleshooting

Random mode loads nothing, or the wrong thing. random_folder defaults to ., so if you forget to point it at your real clip directory it'll rummage through whatever the working directory happens to be. Set the folder explicitly, and confirm it actually contains video files.

Frame count is bigger than you bargained for. A loader hands you every frame it decodes, and a long clip at 30fps is hundreds of them - each one a full image the rest of your graph has to process and hold in VRAM. If you only need a slice, trim or frame-skip downstream; watch frame_count to see what you're really working with.

You wanted a repeatable random pick. That's what seed is for. Leave it fixed while you dial in the rest of the workflow, then change it when you want a fresh draw.

It's one person's utility node, not a Swiss-army loader. This pack self-describes as "dumb shit to make life a lil more comfy," and that's the right expectation. If you need deep control over frame rate, format handling, and audio, the dedicated video suites do more. Load Video Plus earns its spot when the random-folder batch trick is the thing you actually want.

CategoryπŸ§”πŸ»β€β™‚οΈπŸ‡° πŸ‡ͺ πŸ‡Ό πŸ‡°

Inputs (7)

NameTypeDefaultDescription
videoIMAGEβ€”
use_random_videoBOOLEANfalseβ€”
random_folderSTRING.β€”
n_videosINT11–10β€”
seedINT00–100000β€”
sortBOOLEANfalseβ€”
loop_sequenceBOOLEANfalseβ€”

Outputs (3)

NameTypeDescription
output_videoIMAGEβ€”
output_maskMASKβ€”
frame_countINTβ€”