Nodes/Quality of Life Nodes for ComfyUI/Load Videos From Folder (Soze)
ComfyUI Node

Load Videos From Folder (Soze)

Batch through a clips folder like the pack's image loaders

By SozeInc·Created 2 years ago·Updated 5 days ago· 10
Load Videos From Folder (Soze)
    • Video
    • Input_Path
    • Video_Filename_Path
    • Video_Filename
    • Video_Filename_No_Ext
    • Video_Changed
    • status
    Input_Folder
    index0

    Soze ships a handful of "Load X From Folder" nodes for images, and this is the video version - point it at a directory, feed it an index, and it hands back the video at that position along with a pile of filename metadata you'll want for a batch pipeline.

    How it works

    It's a folder iterator. Input_Folder is the directory, index is which file in it you want (0-based). You don't loop inside the node itself - you drive it by incrementing index across queued runs, the same pattern as this pack's image folder loaders and as Load Prompt From Folder X Lora.

    The inputs and outputs that matter

    • Input_Folder - the directory of video files to read from.
    • index - which video to load this run, 0 through however many files are actually in the folder.

    The outputs give you the clip itself plus everything you'd need to process a folder of videos and land the results back with matching names: Video (the VIDEO object for whatever downstream node consumes it), Input_Path, Video_Filename_Path, Video_Filename, Video_Filename_No_Ext, a Video_Changed boolean, and status.

    Video_Changed is the one worth building around: it flags whether the loaded clip is actually different from the last one loaded. Gate an expensive step - an interpolation pass, a re-encode, an upload - behind it, and you skip redoing work on a video you've already processed if your index hasn't actually advanced to something new.

    Where it fits in a batch pipeline

    The obvious pattern is: point this at a folder of raw clips, run whatever processing you need - upscale, interpolate, watermark, feed into this pack's Append To Video for concatenation with audio - and use Video_Filename_No_Ext to build a matching output name with something like Save Image With Absolute Filename's token syntax (or an equivalent video-save node), so the tenth output clip is obviously tied back to the tenth input clip without you tracking that mapping by hand. Drive index off ComfyUI's own auto-increment on the queue and the whole folder processes itself, one queued run per file.

    Installing it

    ComfyUI Manager: search ComfyUI_Soze. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/SozeInc/ComfyUI_Soze.git, pip install -r ComfyUI_Soze/requirements.txt, restart. It leans on ComfyUI's native VIDEO type, so you need a reasonably current ComfyUI core - no extra video libraries needed for the loading step itself. (The pack's Append To Video node shells out to ffmpeg for concatenation, but that's a different node - this one just reads files.)

    Common issues

    index accepts values up to 1,000,000, which is just the widget's ceiling, not a promise that your folder has that many files - walk past the last actual video and you're outside what the node can resolve, so watch status when you're batching to confirm each run actually landed a file. And because this is a straight folder read, ordering follows whatever your filesystem gives you for that directory - if you need a specific processing order, number your filenames (001_clip.mp4, 002_clip.mp4, …) rather than relying on however the files happened to land there.

    Categoryimage

    Inputs (2)

    NameTypeDefaultDescription
    Input_FolderSTRING
    indexINT00–1000000

    Outputs (7)

    NameTypeDescription
    VideoVIDEO
    Input_PathSTRING
    Video_Filename_PathSTRING
    Video_FilenameSTRING
    Video_Filename_No_ExtSTRING
    Video_ChangedBOOL
    statusSTRING