Nodes/ComfyUI-AI2Go-Utils/AI2Go Multi Video Loader Advanced
ComfyUI Node

AI2Go Multi Video Loader Advanced

The multi-video loader, plus a filename for every clip

By Little-God1983·Created 2 months ago·Updated 4 days ago· 2
AI2Go Multi Video Loader Advanced
    • count
    • video_1
    • audio_1
    • filename_1
    • video_2
    • audio_2
    • filename_2
    • video_3
    • audio_3
    • filename_3
    • video_4
    • audio_4
    • filename_4
    • video_5
    • audio_5
    • filename_5
    • video_6
    • audio_6
    • filename_6
    • video_7
    • audio_7
    • filename_7
    • video_8
    • audio_8
    • filename_8
    files_json[]
    force_rate0
    output_slotsauto

    The AI2Go Multi Video Loader with one addition per file: a filename_N string output. Same drop-up-to-eight-clips node, same video_N / audio_N sockets, same lazy-load behavior - you're just also getting each clip's bare filename as data.

    That filename is more useful for video than it sounds. Multi-clip video workflows are exactly where you lose track of what's what: you load six clips into one node, each goes to a different branch, and by the time you're an hour into editing the graph you can't remember which socket holds take_3.mp4 vs take_4.mp4. A filename_N output lets a downstream node label renders, branch on which clip is loaded, or write metadata alongside the output - and since sockets stay tied to rows, the name is always paired with its clip even as you rotate files in and out.

    Everything else is inherited from the basic video loader, and it's worth remembering:

    • force_rate = 0 (default) is the free path - clips are handed back lazily, not a single frame decoded. Any other value retimes every clip to that rate (dropping/duplicating frames, real duration preserved) but costs time and memory to do it. Same convention as VideoHelperSuite.
    • audio_N is decoded separately with PyAV, so you get audio even on the lazy path. A clip with no decodable audio track outputs None on that socket - safe for OPTIONAL inputs, a hard fail for REQUIRED ones.
    • output_slots defaults to auto; pin it to keep sockets and wires stable while you swap files.
    • Off-toggle rule unchanged: a switched-off row keeps its socket position but emits None on video_N, audio_N, and filename_N. Feed that into a REQUIRED input and the node fails.
    • count = enabled rows actually emitted, not rows present.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/Little-God1983/ComfyUI-AI2Go-Utils
    

    Restart ComfyUI, or use ComfyUI Manager ("ComfyUI-AI2Go-Utils"). No extra dependencies beyond what ComfyUI ships (PyAV + Pillow). The standing caveat: this repo is frozen at v1.6.1 with issues closed - the author's active development is at ComfyUI-IntoTheLatent-Utils under ITL* node names. Keep this pack for old workflows; don't expect fixes.

    Troubleshooting

    • "not found in the input folder - re-add it" - the source clip moved or was deleted from input/. Re-drop it.
    • audio_N comes back None on a clip that has sound - likely an undecodable audio track (the node handles the last-decodable-stream case, but a genuinely unsupported codec still yields None). Check the console for the named file.
    • Everything got slower after you set force_rate - that's the decode cost of retiming. Back to 0 if you don't need it.

    Choose the Advanced variant the day you need the name, plain otherwise - the mechanism underneath is identical, and the filename is the whole difference.

    CategoryAI2Go/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 (25)

    NameTypeDescription
    countINT
    video_1VIDEO
    audio_1AUDIO
    filename_1STRING
    video_2VIDEO
    audio_2AUDIO
    filename_2STRING
    video_3VIDEO
    audio_3AUDIO
    filename_3STRING
    video_4VIDEO
    audio_4AUDIO
    filename_4STRING
    video_5VIDEO
    audio_5AUDIO
    filename_5STRING
    video_6VIDEO
    audio_6AUDIO
    filename_6STRING
    video_7VIDEO
    audio_7AUDIO
    filename_7STRING
    video_8VIDEO
    audio_8AUDIO
    filename_8STRING