LTX Chunk Writer (TJ 2.5)
Make a 30-second LTX clip on a card that can only do five
- images
- audio
- images
- handoff_folder
- info
Long video in a local model is a memory problem dressed up as a creativity problem. LTX is the fast option - that's the whole reason people tolerate its weaker prompt adherence - but 1080p for thirty seconds still isn't fitting in one pass on consumer hardware. So you render it as chunks and stitch. LTX Chunk Writer (TJ 2.5) is the half that makes the seam work.
What it does besides saving frames
Saving PNGs is the boring part. The useful part is the handoff: it copies the last N frames of the chunk it just wrote into ComfyUI's input/ folder, so the next chunk can pick them up as a guide image sequence and continue from exactly where the last one stopped. That's the trick that keeps subject and camera coherent across a cut - and it's why the overlap is a real overlap rather than two shots butted together.
handoff_frames is snapped to a multiple of 8 for a reason worth internalising: the LTX VAE packs 8 pixel frames into one latent frame. Hand it 12 and the guide lands mid-latent, and you get a hitch at the seam that no amount of re-rendering fixes.
The node also passes images straight through, so it sits in front of your Video Combine rather than replacing it. You get the frames on a wire and the files on disk from one stage.
The fields that matter
- images - your decoded chunk. Everything else is bookkeeping.
- run_name - the folder for the whole video. Same string on every chunk, or you'll silently build four separate one-chunk runs.
- chunk_index - 1, 2, 3… per chunk.
total_chunksplusauto_assemblemeans the last chunk joins everything into<run>/final/with a seam-blend you don't have to think about. - handoff_frames - 8 by default, 0 disables the handoff entirely (useful when you'd rather cut hard between unrelated shots).
- frame_format / jpeg_quality - JPEG q95 by default, and the reasoning is honest: the h264 encode that follows loses far more than the JPEG does, and JPEG is ~30× faster to write and several times smaller. Handoff frames are always PNG regardless, because those go back into LTX as guides and need to stay clean. Chroma isn't subsampled, so text doesn't smear.
- audio (optional) - wire the chunk's audio in, normally off the audio VAE decode of the first pass. It gets saved beside the frames and crossfaded into one continuous track at assembly.
Outputs: images (pass-through), handoff_folder (where the guide frames landed), info.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE_STUDIO_ONE.git
Restart, then bash install_requirements.sh (install_requirements.bat on Windows) once - the pack depends on other node packs that Manager won't pull in. If you're driving this from the LTX 2.5 studio UI rather than hand-wiring, Render All fills chunk_index, total_chunks and video_fps for you; set them by hand only when you're queueing chunks yourself.
Traps, in order of how often they catch people
match_to_previous sounds great and the author's own tooltip calls it unreliable - it level-matches per frame, comparing this chunk's first frame against the previous chunk's last handoff. Prefer assemble_match_levels, which measures the shared frame with early_cut and carries the correction forward chunk by chunk. Leave the per-frame one off unless you're specifically fixing one bad chunk.
Re-running a chunk with clear_chunk_first on wipes that chunk's folder before writing (only that one) - good hygiene, since stale frames from a 20-frame render sitting under a 40-frame render will absolutely poison your assembly.
And the disk fills faster than you think. A 16-second 1080p sequence is around 10 GB as float32 in memory; even at JPEG q95 you're storing hundreds of stills per run. save_all_frames off writes only the handoff frames, which is the right move while you're testing whether a seam works at all.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| run_name | STRING | run01 | Folder name for this whole long-video run. Keep it the same across every chunk of the same video. |
| chunk_index | INT | 11–999 | Which chunk this is. 1 for the first, 2 for the next, and so on. |
| handoff_frames | INT | 80–64 | How many frames from the END of this chunk to copy into the input folder, ready to guide the next chunk. Snapped to a multiple of 8 because the LTX VAE packs 8 pixel frames into 1 latent frame — an unaligned handoff lands mid-latent and causes a hitch. 0 disables the handoff. |
| runs_folder | STRING | ltx25_one_runs | Subfolder of ComfyUI's output directory where full chunk frames are written. |
| save_all_frames | BOOLEAN | true | Off = only write the handoff frames. Useful for testing the seam without filling a disk. |
| clear_chunk_first | BOOLEAN | true | Wipe this chunk's folder before writing, so re-running a chunk doesn't leave stale frames behind. Only ever touches this one chunk folder. |
| total_chunks | INT | 11–999 | How many chunks this run has in total. Set automatically by Render All. When chunk_index reaches this number the run is assembled. |
| auto_assemble | BOOLEAN | true | After writing the final chunk, join every chunk into <run>/final/ with a cross-dissolve across the overlap. Uses handoff_frames as the overlap width. |
| write_video | BOOLEAN | true | After assembling the final chunk, also encode <run>_final.mp4 next to the final/ folder. The PNGs are written either way - the video is a convenience copy, not the master. |
| video_fps | FLOAT | 25.001–240 | Frame rate for the assembled video. Render All sets this from the timeline automatically; only set it by hand if you're queueing chunks yourself. |
| video_crf | INT | 180–51 | h264 quality. Lower is better and bigger; 18 is visually near-lossless. |
| match_to_previous | BOOLEAN | false | Level-match this chunk to the previous one. Compares this chunk's first frame against the previous chunk's last handoff frame - the same moment, regenerated - and applies that per-channel correction to every frame. Off for chunk 1, or when you'd rather grade in your editor. |
| frame_format | COMBO | jpeg | Format for the chunk frames, which are intermediates on their way to the mp4. JPEG is about 30x faster to write and several times smaller; measured end to end, q95 4:4:4 lands within 0.2dB of lossless PNG because the h264 encode that follows loses far more than the JPEG does. Handoff frames are ALWAYS PNG regardless - those go back into LTX as guides and must stay clean. |
| jpeg_quality | INT | 9570–100 | Only used when frame_format is jpeg. 95 is visually identical to PNG once the video is encoded. 100 is near-lossless but roughly PNG-sized, so it buys speed rather than space. Chroma is never subsampled. |
| write_final_frames | BOOLEAN | false | Also write the assembled sequence as stills in <run>/final/. Off by default because the mp4 is the deliverable. Forced on if write_video is off, so an assembly always produces something. |
| seam_mode | COMBO | early_cut | Used by auto_assemble. Where to join two chunks: early_cut switches at the frame the two chunks share (the handoff guide, reproduced), so there is nothing to ghost. early_scurve ramps across seam_blend_frames with an S-curve, which smooths a velocity difference between chunks; early_blend is the straight-line version. dissolve and hard_cut are the old behaviour. |
| seam_blend_frames | INT | 31–32 | How many frames the early_scurve / early_blend seam covers. Clamped to handoff_frames. Short is usually right: the chunks only agree near the start of the overlap, so a long blend reaches into frames that have already diverged. |
| assemble_match_levels | BOOLEAN | true | Used by auto_assemble. Corrects each chunk's brightness to the one before it, carried forward so chunk 3 matches corrected chunk 2. With early_cut the correction is measured from the single frame the two chunks share, which makes it exact. Unrelated to match_to_previous above, which is per-frame and unreliable. |
| audioopt | AUDIO | Optional. Wire this chunk's audio in - normally the LTXV Audio VAE Decode hanging off the FIRST pass. Saved next to the chunk's frames and crossfaded into one continuous track when the run is assembled. Leave unconnected for a silent run. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| handoff_folder | STRING | — |
| info | STRING | — |