IAMCCS WAN Shotboard Loop Chunk Select
The node that turns a shot list into 'this iteration's shot'
- timeline_plan
- start_image
- end_image
- prompt
- frames
- motion
- frame_rate
- chunk_index
- chunk_count
- report
- relay_local_prompts
- relay_segment_lengths
- relay_max_frames
- relay_epsilon
- relay_timeline_data
- start_path
- end_path
- selected_timeline_plan
This is the node that makes a shotboard loop actually loop. IAMCCS WAN Shotboard Loop Chunk Select takes the timeline plan and a loop index, and hands back the specific chunk you're supposed to generate this iteration - start image, end image, prompt, frame count, everything the sampler chain needs for one shot.
What it does
Two real inputs matter:
- timeline_plan - the
IAMCCS_WAN_TIMELINE_PLANfrom Loop Info or Planner PURE. - loop_index - an INT that comes from your loop counter. It's lazy, so if nothing is wired in yet ComfyUI just asks you for the number.
- index_mode -
direct(default) throws an error if you ask for a chunk past the end of the board;clamppins you to the last chunk instead. Clamp is nice for testing where you don't want a hard stop.
Give it index 2 and it returns chunk 2's start_image and end_image (the IMAGE outputs you'll encode and feed to your I2V node), the prompt for that shot, its frames and motion values, and the frame_rate. On top of that you get the relay outputs - relay_local_prompts, relay_segment_lengths, relay_max_frames, relay_epsilon, relay_timeline_data - which carry the per-shot prompt-relay routing for longer boards, plus start_path/end_path if you want the raw file paths.
The last output is the useful one for complex graphs: selected_timeline_plan, a copy of the plan narrowed down to just this chunk. Wire that forward instead of the full plan and every downstream node is guaranteed to be looking at one shot, not sixteen.
How it works
Under the hood it indexes into the plan's list of FLF pairs (start→end image pairs), pulls the matching pair, and rebuilds a single-chunk plan around it. That's the whole trick - the heavy lifting is done by IAMCCS_WanShotboardPlannerPure when it built the pairs; this node is a slice operation with a report.
Where it sits
Planner PURE → Loop Info → Loop Chunk Select → (encode start/end images) → WanImageMotionPro → sampler → feed the latents back as prev_samples → bump loop_index → next chunk. The frames output is also worth wiring into your motion node's length so every chunk gets the duration the plan assigned it rather than whatever you typed last week.
Installing it
Part of IAMCCS-nodes. ComfyUI Manager (search "IAMCCS"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart, done. No dependencies beyond the pack itself.
Common issues
The classic error is loop_index outside active chunk_count - that's direct mode refusing an out-of-range index, and it usually means your loop counter isn't stopping at chunk_count. Either cap the counter or switch to clamp. And if it throws "no active FLF chunks," your planner board has fewer than two images; this node can't build a pair it wasn't given.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| timeline_plan | IAMCCS_WAN_TIMELINE_PLAN | — | |
| loop_index | INT | 00–100000 | — |
| index_mode | COMBO | direct | 2 options: direct, clamp |
Outputs (17)
| Name | Type | Description |
|---|---|---|
| start_image | IMAGE | — |
| end_image | IMAGE | — |
| prompt | STRING | — |
| frames | INT | — |
| motion | FLOAT | — |
| frame_rate | FLOAT | — |
| chunk_index | INT | — |
| chunk_count | INT | — |
| report | STRING | — |
| relay_local_prompts | STRING | — |
| relay_segment_lengths | STRING | — |
| relay_max_frames | INT | — |
| relay_epsilon | FLOAT | — |
| relay_timeline_data | STRING | — |
| start_path | STRING | — |
| end_path | STRING | — |
| selected_timeline_plan | IAMCCS_WAN_TIMELINE_PLAN | — |