Nodes/IAMCCS-nodes/Load Images From Dir (Lite) ??
ComfyUI Node

Load Images From Dir (Lite) ??

Re-read your saved frames for the next LTX-2 segment

By IAMCCS·Created 11 months ago·Updated 7 days ago· 113
Load Images From Dir (Lite) ??
    • images
    • count
    • report
    directoryiamccs_extension_disk/extended
    modeall
    count9
    start_index0
    end_index9
    count_in0
    start_index_in0
    end_index_in0

    The "Lite" philosophy of this pack's LTX-2 extension tools is: if you can't hold all the frames in VRAM, don't try. Put them on disk instead. IAMCCS LoadImagesFromDirLite is the reading half of that strategy - it loads a range of frames from a directory into an IMAGE batch, sized the way you ask, so a long video can be processed in segments without ever holding the whole thing in memory.

    The default directory is iamccs_extension_disk/extended, which tells you exactly where this slot belongs in the IAMCCS extension pipeline: segment N finishes, its tail frames get saved to that disk folder, and this node reads them back for segment N+1.

    How it works

    • directory - where the frame files live (the pack's own path conventions assume relative paths under your ComfyUI base; an absolute path works too).
    • mode - all, from_start, from_end, or range (all four are here, same as the other Lite slicers).
    • count, start_index, end_index - the selection knobs for those modes.
    • count_in, start_index_in, end_index_in - optional linked overrides, so one control node can drive the selection across segments.

    There's one subtle but important implementation detail: the node sets IS_CHANGED to always-true, which forces ComfyUI to re-run it every time. That's deliberate - a directory's contents can change without the path string changing, so without this the node would cache and hand you stale frames. It means the load is never skipped, which is exactly what you want in a frame-feeding loop.

    Outputs: images, count (how many frames loaded), and report (a summary including what was found and selected).

    When it's the right tool

    If your LTX-2 extension workflow runs with all frames resident in VRAM, this is the wrong node - that's what Image Batch Range (Lite) is for, slicing an in-memory batch. Use this one when you've chosen the disk strategy: save frames to disk to keep VRAM free, then reload the window you need. The two "Lite" nodes are opposite halves of the same memory-saving design.

    Install

    Part of IAMCCS-nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/IAMCCS/IAMCCS-nodes.git
    

    or ComfyUI Manager → search IAMCCS, restart. No dependencies beyond ComfyUI's usual image stack.

    Gotchas

    An empty directory raises a clear "No images found" error - check the path first if you see it. And because it always re-runs, don't drop this node into a spot where it reloads hundreds of frames repeatedly in a tight loop; the constant reload is the cost of never being stale. Keep the windows small and it stays cheap.

    CategoryIAMCCS/LTX-2

    Inputs (8)

    NameTypeDefaultDescription
    directorySTRINGiamccs_extension_disk/extendedDirectory containing image frames.
    modeCOMBOall4 options: all, from_start, from_end, range
    countINT91–100000
    start_indexINT00–100000
    end_indexINT90–100000
    count_inoptINT00–100000Optional linked override for count.
    start_index_inoptINT00–100000Optional linked override for range start index.
    end_index_inoptINT00–100000Optional linked override for range end index.

    Outputs (3)

    NameTypeDescription
    imagesIMAGE
    countINT
    reportSTRING