Nodes/IAMCCS-nodes/LTX-2 Extension Module (Disk / Low RAM) ??
ComfyUI Node

LTX-2 Extension Module (Disk / Low RAM) ??

Extend LTX-2 video without blowing up your RAM

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
LTX-2 Extension Module (Disk / Low RAM) ??
    • extended_dir
    • start_dir
    • overlap_frames
    • calculated_frames
    • extension_frames
    • report
    source_diriamccs_vae_frames/seg0
    output_diriamccs_extension_disk/extended
    start_diriamccs_extension_disk/start
    overlap_frames9
    overlap_sidesource
    overlap_modecut
    enable_mathtrue
    math_operationnone
    safe_modenone
    start_frames_rulenone
    presetcustom
    new_dir
    math_value_b1

    Long LTX-2 extensions have a dirty secret that has nothing to do with the GPU: the system RAM. Keep enough frames around as IMAGE tensors - thousands of frames at 1080p in float32 - and your 64GB workstation starts swapping to disk mid-run. That's what the Disk variant of the Extension Module exists for. Instead of stitching IMAGE tensors in memory, it reads and writes PNG frame directories. Same overlap/blend logic as the in-memory module, zero giant tensors in RAM.

    This is squarely aimed at the low-RAM LTX crowd - the KB's own guidance is that 64GB system RAM is the practical floor for comfortable LTX-2 work, and below that, every frame you hold in memory is a frame that's about to page. The pack's broader low-RAM story pairs this node with VAEDecodeToDisk (decode one frame at a time to disk) on one side and a disk→latent reader on the other.

    How it works

    Where the in-memory module takes IMAGE inputs, this one takes directory paths:

    • source_dir - where your accumulated frames live (default iamccs_vae_frames/seg0).
    • new_dir (optional) - the newly generated frames for this pass.
    • output_dir - where the stitched sequence gets written (default iamccs_extension_disk/extended).
    • start_dir - where the overlap/start frames for the next pass get written (default iamccs_extension_disk/start).

    Everything else mirrors the flagship module: overlap_frames, overlap_side, overlap_mode (cut or one of the crossfades), enable_math/math_operation, safe_mode, start_frames_rule (to keep the extracted start frames at 8n+1), and the same preset list. It processes the frames on disk and returns extended_dir and start_dir so downstream disk-based nodes know where to look.

    One implementation detail worth knowing: this node returns IS_CHANGED = float("nan"), meaning ComfyUI always reruns it - by design. It mutates directories on disk, so caching would leave you with stale stitched sequences or stale start-frame folders. If it seems to "rerun every time," that's correct behavior, not a bug.

    The inputs and outputs that matter

    You set the paths once (they're relative to your ComfyUI output directory by default) and mostly forget them. The values you'll actually touch: overlap_frames (default 9) and preset (start at target_extension_ltx2 or the 24fps presets). Outputs: extended_dir, start_dir, then overlap_frames, calculated_frames, extension_frames INTs and a report.

    Installing it

    Ships in IAMCCS-nodes. ComfyUI Manager → "IAMCCS" → install, or:

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

    Restart ComfyUI, under IAMCCS/LTX-2. No extra dependencies - but the workflow around it (VAE-decode-to-disk, disk-to-latent) needs the pack's sibling nodes and the ComfyUI-LTXVideo nodes.

    Common issues

    The big one is directory collisions: this node always reruns and writes to fixed paths, so running two of them in parallel (or two workflows sharing a source_dir/output_dir) will corrupt each other's state. Give every project its own subdirectory. Second, new_dir is optional - if you leave it empty, the node stitches only what's in source_dir, which is a legitimate workflow (extend the accumulated clip without a fresh pass) but easy to mistake for a bug when you expected new frames to appear. And because it's disk-based, the 8n+1 start_frames_rule matters more than ever - a wrong start-frame count means the next encode fails a minute into the run, and you only find out when the loop stops.

    CategoryIAMCCS/LTX-2

    Inputs (13)

    NameTypeDefaultDescription
    source_dirSTRINGiamccs_vae_frames/seg0Directory containing the current accumulated frames.
    output_dirSTRINGiamccs_extension_disk/extendedDirectory where the stitched sequence will be written.
    start_dirSTRINGiamccs_extension_disk/startDirectory where start/overlap frames for the next pass will be written.
    overlap_framesINT91–256
    overlap_sideCOMBOsource2 options: source, new_images
    overlap_modeCOMBOcut4 options: cut, linear_blend, ease_in_out, filmic_crossfade
    enable_mathBOOLEANtrue
    math_operationCOMBOnone8 options: none, a-b, a-1, a+b, a*b, a/b, +2
    safe_modeCOMBOnone2 options: none, native_workflow_safe
    start_frames_ruleCOMBOnone3 options: none, ltx2_round_down, ltx2_nearest
    presetCOMBOcustom10 options: custom, target_extension_ltx2, lossless_refresh_24fps, lossless_refresh_strong_24fps, videoclip_audio_24fps, monologue_audio_24fps, +4
    new_diroptSTRINGOptional directory containing the new generated frames for the current pass.
    math_value_boptINT10–256

    Outputs (6)

    NameTypeDescription
    extended_dirSTRING
    start_dirSTRING
    overlap_framesINT
    calculated_framesINT
    extension_framesINT
    reportSTRING