Nodes/VACE Automation/VACE Clip Loop Start
ComfyUI Node

VACE Clip Loop Start

The loop head that carries your joined clip forward

By EnviralDesign·Created 6 months ago·Updated 3 months ago· 0
VACE Clip Loop Start
  • clips
  • accumulator_clip
  • flow
  • next_index
  • clip_count
  • fps
  • left_clip
  • right_clip
  • is_last
  • iteration_index
  • is_final_loop_pass
fps
final_loopfalse
debugfalse
next_index1

This is the heart of the pack. Wan's native context tops out at 81 frames, so any long video gets built by generating seams between shorter clips - and the classic way to do that is to iterate down your clip list, joining one pair at a time. VACE Clip Loop Start is the loop head: each pass it hands you the current pair of clips to seam, plus the loop state, and it does it all in memory. No intermediate videos written to disk, no folder manifest, no stitching scripts between runs.

How it works

Feed it the clip list from VACE Clip Collector (or VACEClipList3), and on each iteration it emits:

  • left_clip - the accumulated joined clip so far (or the first clip on pass one)
  • right_clip - the next clip in the list
  • flow, next_index, is_last, iteration_index, is_final_loop_pass - the loop machinery
  • clip_count and fps - passed through for the seam nodes

The clever bit is the accumulator_clip. After each seam is generated and assembled, VACE Clip Loop End feeds the joined result back in, so the next iteration's left_clip is the whole accumulated video, not just the original first clip. You're carrying the growing joined clip forward through the loop without ever materializing it to disk.

There's also a final_loop toggle (default false). Flip it on and the loop runs one extra pass after the last normal seam: right_clip wraps around to the first clip, and you get a tail-to-head transition that turns the whole joined thing into a seamless loop. That's the Wan answer to AnimateDiff's old looping trick, and it's why the pack's README calls it "one final tail-to-head loop pass."

Inputs and outputs that matter

You set three things: clips, fps, and final_loop. The next_index and accumulator_clip inputs exist but their tooltips say it plainly - internal loop state, leave unconnected. Wire them and you'll fight the recursion.

For outputs, the ones you actually wire:

  • left_clip and right_clipVACE Join Prep (the seam generator)
  • is_last, next_index, fps, and flowVACE Clip Loop End
  • is_final_loop_pass → also into the join prep/assemble so it knows to do the tail-to-head variant
  • iteration_index → into your seed math (see below)

Installing it

Same pack as everything else, no extra pip deps:

cd ComfyUI/custom_nodes
git clone https://github.com/EnviralDesign/comfy-vace-automation

Restart ComfyUI, or install via ComfyUI Manager.

When it bites you

  • Fewer than two clips errors out immediately - there's nothing to loop.
  • Wiring next_index by hand is the classic foot-gun. It defaults to 1 and steps automatically; forcing it out of range gives you a next_index ... out of range error. Leave it alone.
  • Resolution mismatch between the accumulated left clip and the next right clip. This one sneaks up on you: if one source clip is a slightly different size, the loop dies mid-way with Loop pair resolution mismatch. Normalize all inputs first.

A genuinely useful trick: because iteration_index comes out as a clean INT, you can add it to a VACESeedInt seed and feed the sum into your KSampler. That way every seam gets a different seed and you don't get the same transition baked in five times.

Categoryvideo/VACE

Inputs (6)

NameTypeDefaultDescription
clipsIMAGE
fpsFLOAT
final_loopBOOLEANfalse
debugBOOLEANfalse
next_indexoptINT1Internal loop state. Leave unconnected.
accumulator_clipoptIMAGEInternal loop state. Leave unconnected.

Outputs (9)

NameTypeDescription
flowFLOW_CONTROL
next_indexINT
clip_countINT
fpsFLOAT
left_clipIMAGE
right_clipIMAGE
is_lastBOOLEAN
iteration_indexINT
is_final_loop_passBOOLEAN