📊 Auto Loop Calculator (LTX 2.3)
Chunking math that respects LTX's 8n+1 frame rule
- safe_faces_list
- scene_cuts_list
- chunk_frames
- skip_frames
- select_every_nth
LTX Video 2.x is picky about one thing that catches everyone eventually: frame counts have to be divisible by 8, plus 1 (the "8n+1" rule). Ask for 80 frames and it fails or glitches; ask for 81 and it's happy. When you're chunking a long video through the loop pattern, that rule has to hold for every chunk you generate - and doing that arithmetic by hand while you're also tuning prompts is a recipe for a silent quality drop.
AutoLoopCalculatorLTX is the pack's LTX-specific chunk scheduler. Same job as the base AutoLoopCalculator - work out chunk_frames and skip_frames for each cycle - but every number that comes out is snapped to the 8n+1 rule first.
How it works
It walks the same global accumulator as the other calculators, but with LTX's constraints baked in:
- Every chunk is rounded up to the nearest
8n+1frame count (minimum 9). - The
target_frames_per_loopslider is stepped in 8s (default81, min 9, max 257), and the node proportionally rebalances it so the whole video divides into sane loop sizes instead of leaving a gnarly final chunk. - It tracks a physical timeline - the real frame limit of the source - and pads requests beyond it rather than asking the VAE for frames that don't exist.
- Scene cuts and face cuts get snapped to the rule too: it cuts at the scene boundary, then rounds the chunk up to a valid 8n+1 count.
The source also flips the pack's ltx_mode global, which tells the stitcher to account for the n+1 frame correctly when it accumulates the timeline. It's the kind of coordination you'd never get right by wiring raw ints around.
Inputs and outputs
source_frame_count(INT) - from the analyzer.target_frames_per_loop(INT, default81, step 8) - how big you want each loop; the node reserves the right to rebalance it.select_every_nth(INT) - frame skipping, if you're limiting fps.current_loop_index(INT) - from SequentialLoopStart.- Optional
safe_faces_list(FACE_CUTS) andscene_cuts_list(SCENE_CUTS).
Outputs: chunk_frames, skip_frames, select_every_nth (no log wire on this one - the status goes to the console).
Why the rule matters
This is the "you will get burned" node. LTX 2.3's own documentation states width/height must be divisible by 32 and frame count by 8+1 - off-grid values fail rather than round. If you hand LTX a 76-frame chunk, you get an error or a corrupt latent, and it's not obvious why. This node makes the "why" never happen. If you're running the base calculator against LTX by mistake, this is the swap that fixes it.
Install
ComfyUI Manager → "comfyui-sequential-batcher", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Meisoftcoltd/comfyui-sequential-batcher
Restart ComfyUI. No models to fetch. Pack-wide note: launch without --highvram, and pair it with the VAE Safe Frame Padder if your LTX loop still hits the rule at the seam.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| source_frame_count | INT | — | |
| target_frames_per_loop | INT | 819–257 | — |
| select_every_nth | INT | 11–100 | — |
| current_loop_index | INT | — | |
| safe_faces_listopt | FACE_CUTS | — | |
| scene_cuts_listopt | SCENE_CUTS | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| chunk_frames | INT | — |
| skip_frames | INT | — |
| select_every_nth | INT | — |