Nodes/IAMCCS-nodes/IAMCCS WAN Shotboard Loop State
ComfyUI Node

IAMCCS WAN Shotboard Loop State

A tiny memory for long loops, so nothing forgets what already ran

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
IAMCCS WAN Shotboard Loop State
  • timeline_plan
  • previous_state
  • loop_state
  • report
loop_index0
chunk_report
accumulator_report
prev_samples_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_STATE object 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.

CategoryIAMCCS/Wan/PURE/Loop

Inputs (6)

NameTypeDefaultDescription
timeline_planIAMCCS_WAN_TIMELINE_PLAN
loop_indexINT00–100000
previous_stateoptIAMCCS_WAN_LOOP_STATE
chunk_reportoptSTRING
accumulator_reportoptSTRING
prev_samples_reportoptSTRING

Outputs (2)

NameTypeDescription
loop_stateIAMCCS_WAN_LOOP_STATE
reportSTRING