Nodes/ComfyUI_Fill-Nodes/FL Video Cadence Compile
ComfyUI Node

FL Video Cadence Compile

Trim a folder of clips to match a cadence list

By filliptm·Created 3 years ago·Updated about 11 hours ago· 628
FL Video Cadence Compile
    • image_batch
    cadence_list_str24,48,24
    video_directory./input/videos_for_cadence
    use_gpu_accelerationtrue

    This one only makes sense alongside its sibling, FL_VideoCadence, which analyzes an image batch (say, a reference video) for scene changes and outputs a comma-separated list of frame counts per scene - the "cadence" of the reference: how long each shot runs before the next cut. FL_VideoCadenceCompile is the other half: hand it that cadence list plus a folder of your own video clips, and it trims each clip down to match the corresponding cadence entry and stitches the results into one image batch. Together they're a pair for matching the pacing of a set of generated or sourced clips to a reference edit - useful if you're assembling AI-generated shots and want the final cut to breathe at the same rhythm as something you're mirroring.

    Fill-Nodes (filliptm) is a huge, eclectic pack, and its video section leans toward exactly this kind of production tooling - scene detection, cadence matching, crossfading, batch splitting - rather than generation itself.

    How it works

    Per the node's own description: it loads videos from a directory, and for each one, crops from the middle to hit the frame count specified in the cadence list - not trimming from the start, from the middle outward, so the surviving frames are centered in the original clip rather than being whatever happened to be first. All the trimmed clips get concatenated into a single image batch in order. It validates as it goes: a mismatch between how many videos are in the directory and how many cadence values you gave, or inconsistent frame dimensions across clips, raises an error rather than silently producing something broken.

    The inputs and outputs that matter

    • cadence_list_str (default "24,48,24") - comma-separated target frame counts, one per video, in the order the videos will be read from the directory. This is almost always the output of FL_VideoCadence run against your reference footage, not something you'd normally hand-type except for testing.
    • video_directory (default ./input/videos_for_cadence) - where your source clips live. The count of videos found here has to match the count of values in cadence_list_str, or the node errors out rather than guessing.
    • use_gpu_acceleration (default true) - speeds up the crop/decode step where available; leave it on unless you're specifically debugging a GPU-related failure.

    Output is a single image_batch - all the trimmed clips concatenated in sequence, ready for a video-save node or further compositing (a crossfade node, for instance, if you want the cuts to blend rather than hard-cut).

    How to install it

    ComfyUI Manager: search "Fill-Nodes", install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
    pip install -r ComfyUI_Fill-Nodes/requirements.txt
    

    Video decoding at this scale typically leans on OpenCV/ffmpeg-backed libraries, which the pack installs as part of its broader dependency set. Restart ComfyUI once installed.

    Common issues & troubleshooting

    "Count mismatch" error. The number of video files found in video_directory doesn't match the number of comma-separated values in cadence_list_str. Count both explicitly before assuming the node is broken - a stray extra file in the directory (a .DS_Store, a leftover clip) is a common cause.

    "Dimension inconsistency" error. All the source clips need matching frame dimensions. Resize or standardize your source videos to one resolution before feeding them into this node.

    A cadence value is longer than the source clip actually is. Since the node crops from the middle to hit a target frame count, it needs the source to have at least that many frames to crop down from - if your cadence list asks for more frames than a given clip contains, that's the mismatch to check first when a specific clip fails.

    Category🏵️Fill Nodes/Video

    Inputs (3)

    NameTypeDefaultDescription
    cadence_list_strSTRING24,48,24
    video_directorySTRING./input/videos_for_cadence
    use_gpu_accelerationBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    image_batchIMAGE