Nodes/Difforum/Difforum · Load Video
ComfyUI Node

Difforum · Load Video

Get footage into ComfyUI as frames, without another video pack

By chillithebillis·Created 3 months ago·Updated about a month ago· 7
Difforum · Load Video
    • frames
    • frame_count
    • fps
    videofootage.mp4
    max_frames0
    frame_skip1
    resize_to0

    Difforum Load Video is the front door of the VJ side of this pack: it reads a video file from ComfyUI's input folder into an IMAGE batch so the rest of the graph can process it - no extra video helper pack required. It's the first node in the README's fully self-contained difforum_vj_footage.json pipeline (Load Video → VJ Look → Echo Trails → Save Video), which runs with no checkpoint at all.

    Reading is done with OpenCV, so it handles whatever containers OpenCV does, and it's deliberately sandboxed: it only reads files inside the ComfyUI input directory. No absolute paths, no .. escapes - a small but real security win, especially given how custom node history has treated path handling.

    The three knobs that matter

    • video - the filename, from a dropdown of videos found in your input folder.
    • max_frames - cap how many frames you read (0 = all of them). Essential when a 10-second 60fps clip would otherwise dump 600 frames into VRAM as one tensor.
    • frame_skip - read every Nth frame. Grab every other frame to halve the workload; it's the poor man's fps reduction.
    • resize_to - long-edge resize cap (0 = off). A 4K clip resized to 1024 before it ever becomes a batch is dramatically kinder to memory.

    Outputs: frames (the IMAGE batch), frame_count, and fps (the source clip's frame rate). The fps output is the graceful bit - you can wire it straight into Save Video's fps_in so the processed video comes out at the same speed it went in, instead of defaulting to 24.

    Where it fits

    Load Video is the bridge between "footage I already shot" and "live-visual processing" - you can grade it with VJ Look, smear it with Echo Trails, stabilize it with Flow Stabilize, or run it through symmetry for an instant kaleidoscope of real footage. It's plain IMAGE-in/IMAGE-out territory, so it composes with any image node, not just Difforum's.

    Install and gotchas

    The pack installs as one:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chillithebillis/Difforum.git difforum
    

    Restart ComfyUI ([Difforum] loaded N nodes; ComfyUI Manager also has "Difforum"). The core dependency is numpy; video reading uses OpenCV and writing uses imageio-ffmpeg - both usually already present in a ComfyUI install, so the README's VJ template needs no extra nodes at all.

    The classic mistakes: forgetting the file has to live in the input folder (it won't read from anywhere else - by design), and loading a huge clip at full res with max_frames set to 0. Both end with a shrug and an OOM. Also note frame_skip reads every Nth frame - it doesn't blend or interpolate - so motion gets choppier as you skip.

    CategoryDifforum/video

    Inputs (4)

    NameTypeDefaultDescription
    videoSTRINGfootage.mp4
    max_framesINT00–100000
    frame_skipINT11–30
    resize_toINT00–4096

    Outputs (3)

    NameTypeDescription
    framesIMAGE
    frame_countINT
    fpsFLOAT