Nodes/IAMCCS-nodes/Load + Resize Segment From Dir ??
ComfyUI Node

Load + Resize Segment From Dir ??

Load a frame segment already sized for the sampler

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
Load + Resize Segment From Dir ??
    • images
    • width
    • height
    • batch_size
    • report
    directoryiamccs_source_frames/source_video
    moderange
    count9
    start_index0
    end_index9
    width512
    height512
    upscale_methodlanczos
    keep_proportioncrop
    pad_color0, 0, 0
    crop_positioncenter
    divisible_by2
    count_in0
    start_index_in0
    end_index_in0
    devicecpu

    If Load Images From Dir (Lite) is the "read frames from disk" node, Load + Resize Segment From Dir is the "read frames from disk and already have them at the right size" node. It's the two-step pipeline compressed into one: pull a segment of frames out of a directory, resize them all to your target resolution, and hand them to the sampler ready to go. For a long LTX-2 extension workflow where source frames arrive at arbitrary resolutions but the model wants a specific one, this removes a whole resize stage from the graph.

    The default directory is iamccs_source_frames/source_video - the naming tells you this is the front door for source video frames you've pre-extracted, before they become latents.

    How it works

    It's a merger of the two patterns you've already seen in this pack. The selection half uses the same mode (all/from_start/from_end/range) with count, start_index, end_index, plus the linked overrides count_in/start_index_in/end_index_in. The resize half is exactly the KJ-style API from IAMCCS Image Resize Batch Safe:

    • width / height - target size.
    • upscale_method - nearest-exact, bilinear, area, bicubic, lanczos (defaults to lanczos, the sharpest of the five).
    • keep_proportion - stretch/resize/pad/pad_edge/pad_edge_pixel/crop/pillarbox_blur/total_pixels (default crop).
    • pad_color, crop_position, divisible_by - the usual finishing knobs.

    And device (cpu/gpu, default cpu) lets you keep the resize off the GPU when you're tight on VRAM.

    Outputs: images, plus width/height (the actual output size, post-divisible_by rounding) and batch_size - so downstream nodes can see exactly what they're getting without inspecting the tensor. There's also a report string summarizing the load and resize.

    Why the combined node wins

    Two reasons. First, fewer nodes and fewer wires - this pack is visibly designed for big graphs where every hop is noise. Second, and more subtly: doing the resize right after load means you resize once, not resize-then-reload. For a 500-frame source video, that's the difference between one pass and two.

    Install

    Same pack, same drill:

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

    or ComfyUI Manager → search IAMCCS, restart. No extra deps.

    Gotchas

    As with the loader, an empty directory errors out loudly - confirm the frames exist before blaming the node. And watch the resize modes: if your source is a mix of aspect ratios, stretch will distort some frames; crop (the default) is the safer pick for video, even if it does chop edges.

    CategoryIAMCCS/LTX-2

    Inputs (16)

    NameTypeDefaultDescription
    directorySTRINGiamccs_source_frames/source_video
    modeCOMBOrange4 options: all, from_start, from_end, range
    countINT91–100000
    start_indexINT00–100000
    end_indexINT90–100000
    widthINT5120–16384
    heightINT5120–16384
    upscale_methodCOMBOlanczos5 options: nearest-exact, bilinear, area, bicubic, lanczos
    keep_proportionCOMBOcrop8 options: stretch, resize, pad, pad_edge, pad_edge_pixel, crop, +2
    pad_colorSTRING0, 0, 0
    crop_positionCOMBOcenter5 options: center, top, bottom, left, right
    divisible_byINT20–512
    count_inoptINT00–100000
    start_index_inoptINT00–100000
    end_index_inoptINT00–100000
    deviceoptCOMBOcpu2 options: cpu, gpu

    Outputs (5)

    NameTypeDescription
    imagesIMAGE
    widthINT
    heightINT
    batch_sizeINT
    reportSTRING