Load Videos From Folder (Swwan)
Batch video frames, and yes it needs VideoHelperSuite
- IMAGE
What it's for
Load one video file: that's VideoHelperSuite's job and it's fine. Load every video in a directory, in one node, with the same frame-skipping and resizing settings on all of them: that's this node. It's KJNodes' LoadVideosFromFolder, and its reason to exist is dataset-style work - twenty clips from the same shoot, looked at together, gridded into contact sheets, or pushed through a frame-interpolation or upscaling pass in one run.
The dependency nobody mentions
Here's the thing the pack's README hides behind "no need to install the original plugins": this node delegates decoding to ComfyUI-VideoHelperSuite. Its __init__ literally imports ComfyUI-VideoHelperSuite.videohelpersuite (with a couple of fallbacks through sys.modules for Windows path weirdness) and raises ImportError: This node requires ComfyUI-VideoHelperSuite to be installed. if it can't find it. The folder scan lists .webm, .mp4, .mkv, .gif, .mov, then calls VHS's load_video per file and concatenates the results.
So: if VHS is installed, this is a thin multi-file wrapper and works well. If it isn't, this is the one node in the pack that will tell you to go install another pack. The rest of the pack's image tools genuinely don't need their originals, which is what makes this the exception you trip over.
How the settings behave
The frame controls are VHS's, forwarded through unchanged: force_rate resamples to a fixed fps (0 = keep the source rate), frame_load_cap limits total frames, skip_first_frames trims the head, and select_every_nth decimates - that last one is the cheapest way to make a 60fps clip tractable. custom_width/custom_height set a target size, with 0 meaning "leave it" - and since every clip in the folder must stack into one tensor afterwards, mixed source resolutions with 0 here is a shape error waiting to happen.
output_type gives you two shapes of answer. batch concatenates every frame from every video into one long IMAGE batch - great for per-frame processing, dangerous for RAM, because a folder of eight 1080p clips is a lot of float32. grid instead lays the videos out as a contact sheet, grid_max_columns wide, padding short entries with black to keep rows rectangular and padding shorter videos vertically. That's the mode you want when you're eyeballing a folder rather than processing it.
add_label draws the filename (extension stripped) above each video in white on black, sized relative to frame width with an arial.ttf attempt and a default-font fallback. Nice for contact sheets, and it changes your image dimensions - so don't leave it on in a processing run.
One return value: a single IMAGE.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/aining2022/ComfyUI_Swwan
cd ComfyUI_Swwan
python -m pip install -r requirements.txt
Then install VideoHelperSuite too (ComfyUI Manager is the least painful route), and restart. The Swwan requirements deliberately do not include a video backend - the pack's own docs note that GPU/vision extras load lazily and that nothing gets installed for you.
Common issues
ImportError: This node requires ComfyUI-VideoHelperSuite to be installed. Exactly what it says. Install VHS, restart the whole server (not just the page) - the import happens when the node class is constructed.
Empty or wrong output. The path must be absolute and readable, and everything in it must have one of the five known extensions. Relative paths resolve against the directory ComfyUI was launched from.
The batch is enormous. Switch to grid, or use select_every_nth and frame_load_cap. Concatenating a folder's worth of frames into one tensor is the fastest way to make ComfyUI swap.
Grid rows look ragged. Expected - the node pads shorter videos to the tallest in the row rather than rescaling them. Set custom_width/custom_height if you want uniformity.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| video | STRING | X://insert/path/ | — |
| force_rate | FLOAT | 00–60 | — |
| custom_width | INT | 00–4096 | — |
| custom_height | INT | 00–4096 | — |
| frame_load_cap | INT | 00–10000 | — |
| skip_first_frames | INT | 00–10000 | — |
| select_every_nth | INT | 11–1000 | — |
| output_type | COMBO | batch | 2 options: batch, grid |
| grid_max_columns | INT | 41–16 | — |
| add_label | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |