ComfyUI Node

Play (Continue)

The quiet half of ComfyUI's low-VRAM video loop

By wgedeon·Created 12 months ago·Updated 10 months ago· 2
Play (Continue)
  • flow
  • sequence_batches
  • data
  • latent_previous
  • data

If Play (Start) is the engine, Play (Continue) is the clutch. It never does anything flashy on its own - it looks like a near-empty node with a couple of * sockets - but without it the whole batch loop of comfyui_play_traversal doesn't exist. It's the node that decides "render the next chunk" versus "we're done, hand back the results," and it's the reason you can generate a long video on a card that can only hold one short chunk at a time.

The README calls it plainly: "Paired with Play (Start) using a flow link, the Play (Continue) marks the end of the loop." Everything in the loop body lives between the two. You'll wire flow from Play (Start) into Play (Continue)'s flow input, and also pass the sequence_batches output into sequence_batches here. That's the whole pairing.

How it actually loops

Under the hood this is the same dynamic-graph trick comfyui-easy-use's whileLoopStart/whileLoopEnd use - the code in the pack is literally descended from it (the README credits comfyui-easy-use among its "shoulders of giants"). On each iteration, Play (Continue) looks at the remaining sequence_batches:

  • If batches remain, it pops the next one, injects it back into Play (Start) as the new batch_current (along with the current beat_current, scene_current, act_current, and latent_previous), rebuilds the graph with the loop body still in it, and runs again. ComfyUI's execution engine gets a fresh, expanded graph each time.
  • If the queue is empty, it stops looping and just passes data through its single output.

So the loop body is re-executed once per batch, with fresh inputs, until the whole play is done. This is what lets each chunk stay small - the default frames_count_per_batch of 41 frames is way under what an 8 GB card would choke on, and the cost is simply more iterations.

The inputs that matter

  • flow (required) - the FLOW_CONTROL link from Play (Start). This is the pairing, not optional.
  • sequence_batches (required) - the remaining batch queue. This is how the loop knows whether to continue.
  • data (optional, *) - anything you want returned from the loop. Play (Continue) is the only node that can carry a value out of the loop, because once the graph stops expanding, whatever you wire into here is what you get on the output.
  • latent_previous (optional) - the previous chunk's last latent, fed forward so the next batch starts from the last one's state. This is the continuity mechanism the pack was built around, and it's your job to actually update it inside the loop body (usually from the sampler's output) - the node just passes it through.

The single data output is what comes out when the loop finishes. In the sample workflow it's run through a display node just to show the final chunk's info.

Installing

Same story as the rest of the pack - ComfyUI Manager, search "comfyui_play_traversal", or:

cd ComfyUI/custom_nodes
git clone https://github.com/wgedeon/comfyui_play_traversal
pip install -r requirements.txt

Restart and you're done. Note the pack depends on comfy_execution.graph_utils (the GraphBuilder API), so keep ComfyUI itself reasonably current - an old core build can silently lack the expand-graph machinery this loop needs.

Where people get burned

  • Forgetting the pairing. If you wire sequence_batches but not flow, or leave Play (Continue) disconnected from Play (Start), the loop never expands and you get one batch and silence. Flow link first.
  • Not feeding latent_previous back. You can skip it and the loop still runs - you just get no continuity between chunks, which defeats the point. The pack hands you the socket; the wiring of the actual latent is on you.
  • Expecting a visible "loop." Nothing in the UI animates. The magic is in the console - this node prints each iteration's batch filename as it pops them. If you see nothing printing, the loop isn't running.
  • It's a young pack from a single author, version "2.0.0-inprogress." Treat console spam as documentation.
CategoryFeller of Trees/Play Traversal

Inputs (4)

NameTypeDefaultDescription
flowFLOW_CONTROL
sequence_batches*
dataopt*
latent_previousoptLATENT

Outputs (1)

NameTypeDescription
data*