IAMCCS WAN Shotboard Loop State
A tiny memory for long loops, so nothing forgets what already ran
- timeline_plan
- previous_state
- loop_state
- report
Long multi-chunk Wan generation is mostly bookkeeping: knowing which iteration you're on, what the last chunk reported, whether the accumulator has anything buffered. IAMCCS WAN Shotboard Loop State is the bookkeeper - a small node that carries loop history forward so the rest of the graph has a running memory instead of a blank slate every iteration.
What it does
Inputs:
- timeline_plan and loop_index - which plan you're looping over and where you are in it.
- previous_state (optional) - the loop_state output from the previous iteration. Chain it and the node accumulates history; leave it unwired and it starts fresh.
- chunk_report, accumulator_report, prev_samples_report (all optional STRINGs) - the report outputs from the other loop nodes (Chunk Select, the accumulator, Prev Samples Loop Select). Wiring them in gives you a unified log of what happened each iteration.
Outputs:
- loop_state - an
IAMCCS_WAN_LOOP_STATEobject holding the plan's chunk count, the last loop index, and a history list (capped at the last 256 entries). - report - a JSON summary of this iteration's index, chunk count, and history size.
How it works
Mechanically it's boring on purpose: each call appends an entry to the state's history and passes the state along. The value is structural. When you're ten chunks into a sixteen-chunk board and a segment comes out wrong, loop_state tells you which index produced it and what that chunk reported - which is exactly the debugging info you'd otherwise reconstruct by hand from console logs.
Where it fits
Loop State slots into the same loop as the other PURE nodes: Planner → Loop Info → Chunk Select → motion node → sampler, with Loop State sitting alongside and collecting reports. Wire previous_state from its own output back around the loop - that's the memory. It's also a handy place to hang the loop counter's value so a later stage (like a segment planner or an audio timeline) can key off where generation is.
Installing it
Ships in IAMCCS-nodes. ComfyUI Manager (search "IAMCCS"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart after installing. No model files, no extra dependencies - pure JSON state.
Common issues
Honestly, there isn't much to break here. If history looks empty, check that you're feeding previous_state back around the loop - without it each iteration starts from scratch by design. And don't expect it to fix a broken chunk; it tells you what happened, it doesn't rewind it. That's a feature, not a bug.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| timeline_plan | IAMCCS_WAN_TIMELINE_PLAN | — | |
| loop_index | INT | 00–100000 | — |
| previous_stateopt | IAMCCS_WAN_LOOP_STATE | — | |
| chunk_reportopt | STRING | — | |
| accumulator_reportopt | STRING | — | |
| prev_samples_reportopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| loop_state | IAMCCS_WAN_LOOP_STATE | — |
| report | STRING | — |