Nodes/ComfyUI-IntoTheLatent-Utils/ITL Multi Video Loader
ComfyUI Node

ITL Multi Video Loader

Load several clips on one node — video and audio sockets per file, decoded lazily

By Into-The-Latent·Created 30 days ago·Updated about 9 hours ago· 2
ITL Multi Video Loader
    • count
    • video_1
    • audio_1
    • video_2
    • audio_2
    • video_3
    • audio_3
    • video_4
    • audio_4
    • video_5
    • audio_5
    • video_6
    • audio_6
    • video_7
    • audio_7
    • video_8
    • audio_8
    files_json[]
    force_rate0
    output_slotsauto

    Video workflows in ComfyUI burn VRAM, and a big chunk of that burn is loading: decode a 30-second clip into frames and you've already spent time and memory before a single sampling step. The ITL Multi Video Loader's design philosophy is the opposite of most loaders - don't decode anything until you have to. Drop up to 8 clips on one node and each gets a video_N and an audio_N socket, with the video handed back lazily: no frames decoded at all unless you ask for it.

    How it works

    The force_rate field is the whole story:

    • 0 (default) - every clip keeps its native frame rate, and video_N is returned without decoding a single frame. Free. This is the "load a bunch of clips, route them around, only pay when a downstream node actually touches the pixels" path.
    • Any other value (up to 240) - clips are retimed to that rate by dropping or duplicating frames, while keeping their real running time (a 10s clip stays 10s). That's the same convention as VideoHelperSuite. But forcing a rate has to decode the clip's frames to do it, so it costs time and memory. Only set it when your pipeline genuinely needs every clip at a uniform rate - mixing 24, 30, and 60 fps clips into a single edit is the case that justifies it.

    Audio is handled separately: each clip's audio track is decoded with av (PyAV, which ships with ComfyUI) so audio_N is available even on the cheap force_rate == 0 path. A clip with no decodable audio track yields None on that file's audio_N socket - which, like the row toggle, is the same as leaving an unplugged OPTIONAL input. Safe unless that socket feeds a REQUIRED input, in which case the node fails.

    The settings and traps

    • output_slots - auto (sockets appear/vanish with the file list) or pinned 1–8 to keep wires in place while swapping files. Extra pinned sockets output nothing.
    • Row on/off toggle - keeps socket position, outputs None for video_N and audio_N. Equals an unplugged OPTIONAL input; don't toggle off a row feeding a REQUIRED input.
    • count - enabled files actually emitted, not row count.

    Reordering or removing files shifts what each socket carries; the node warns in its status line whenever a wired socket is affected.

    Outputs & install

    Outputs: count (INT), then per file video_N (VIDEO) + audio_N (AUDIO). The Advanced variant adds filename_N per file.

    Install via ComfyUI Manager (search "ComfyUI-IntoTheLatent-Utils") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Into-The-Latent/ComfyUI-IntoTheLatent-Utils
    

    then restart. No extra dependencies - the pack's only declared requirement is Pillow, and video decoding rides on ComfyUI's own PyAV support.

    The trap to avoid: setting force_rate "just in case" when your clips are already at the same rate. You're paying for a full decode for zero benefit. Leave it at 0 until you have a real reason, and let the lazy path do its job.

    CategoryInto The Latent/video

    Inputs (3)

    NameTypeDefaultDescription
    files_jsonSTRING[]Authoritative file list as JSON. Hidden in the UI and kept in sync by the front-end — drop files onto the node instead of editing this.
    force_rateFLOAT00–2400 = off — every clip keeps its own frame rate, and video_N is returned lazily without decoding a single frame (free). Any other value drops or duplicates frames so all clips run at that rate while keeping their real running time (a 10s clip stays 10s). Forcing a rate has to decode the clip's frames to do this, so it costs time and memory — 0 stays free.
    output_slotsCOMBOautoHow many output sockets to show. 'auto' follows the number of loaded files, so sockets appear and disappear as you edit the list. Pick a fixed number to keep the sockets (and your wires) in place while you swap files around — extra sockets with no file behind them output nothing, so don't wire more than you load.

    Outputs (17)

    NameTypeDescription
    countINT
    video_1VIDEO
    audio_1AUDIO
    video_2VIDEO
    audio_2AUDIO
    video_3VIDEO
    audio_3AUDIO
    video_4VIDEO
    audio_4AUDIO
    video_5VIDEO
    audio_5AUDIO
    video_6VIDEO
    audio_6AUDIO
    video_7VIDEO
    audio_7AUDIO
    video_8VIDEO
    audio_8AUDIO