Nodes/Wan Vace Auto Joiner/WAN VACE Auto Joiner
ComfyUI Node

WAN VACE Auto Joiner

Stop hand-building 33-frame VACE batches — let the loop do it

By Rhovanx·Created 8 months ago·Updated 8 months ago· 3
WAN VACE Auto Joiner
    • image
    • mask
    • status
    • is_complete
    loop_index0
    directory
    file_prefixclip
    first_suffix1
    last_suffix2

    Wan hits a hard ceiling the first time you want a video longer than about five seconds. Native context tops out around 81 frames, and the standard way past that - chain clips together with VACE, Alibaba's video-to-video tool - is simple in principle and fiddly in practice. Every transition means building a 33-frame batch from the tail of one clip and the head of the next, masking the seam, and letting VACE redraw it. Do that for three clips and you've built two batches. For ten clips, nine. On a 4090 each one of those VACE runs is a 15-40 minute wait, so getting the batch wrong the first time stings.

    This is the node that builds the batch for you. It's the first of three in the WAN VACE Auto Joiner pack, and it's the brain that lives inside a For Loop, handing each transition to your existing VACE setup.

    What it actually does

    The trick is that it runs in two modes, and which mode depends on the loop index:

    • INIT (first iteration, loop_index = 0): it creates a temp-* folder next to your clips, saves everything but the last 16 frames of clip 1, then reads the last 16 frames of clip 1 and the first 17 of clip 2 into one 33-frame batch. Frames 8 through 24 get painted flat gray - that's the region VACE regenerates - and a matching mask marks exactly those frames as "do work here".
    • PROCESS (every later iteration): it does the same for the next clip pair, and it also picks up the VACE output the Save node wrote to disk, so the sequence keeps growing in the background while the loop churns on.

    The numbers aren't magic, by the way: 33 = 16 overlap frames + 17 lead-in frames, which is exactly what WanVaceToVideo expects as a transition batch. If your Wan 2.1/2.2 VACE setup is the standard Kijai-style WanVaceToVideo node, this slots straight into it.

    The inputs that matter

    All five inputs are required, but a beginner really sets four of them:

    • directory - the folder holding your clips.
    • file_prefix - clip by default, matching files named clip_00001.mp4.
    • first_suffix / last_suffix - the numeric range of your clips. Five clips named 1-5 means first=1, last=5.
    • loop_index - don't type this; wire it to For Loop Start's index output.

    The outputs are what feed VACE: imageWanVaceToVideo's control_video input, mask → its control_mask. status and is_complete are debug breadcrumbs - ignore them until something breaks.

    Installing it

    Via ComfyUI Manager: Manager → Install Custom Nodes → search "Wan Vace Auto Joiner". Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Rhovanx/wan_vace_auto_joiner.git
    

    Then restart ComfyUI. The pack downloads no model files - it assumes your WAN VACE models are already loaded. What you do need installed is ComfyUI-Easy-Use, because the For Loop Start/End nodes come from there. One honest gotcha: the repo has no requirements.txt, and the code import cv2 at the top. If the node fails to load with an ImportError, opencv is the usual culprit - most video setups already have it, but a minimal install may not. Optional extras are pip install scipy for slightly better smoothing and ffmpeg on your PATH if you want audio later.

    Wiring it into the loop

    The README ships a ready workflow (Wan Vace Auto Joiner WF.json in the repo's examples folder), but the shape to copy is small: For Loop Start → Auto Joiner → WanVaceToVideo → VAE Decode → Save → back to For Loop End. Set the loop total to N-1 for N clips - three clips, total of 2. Queue once and the loop owns the rest.

    Common issues

    • "Need at least 2 videos to join" - check first_suffix/last_suffix: the range must cover two or more files, and the files must actually be named prefix_00001.mp4-style with zero padding.
    • Loop exits early - the classic cause is skipping the Save node's pass-through, so the loop has no real dependency to wait on. Don't try to use FLOW_CONTROL as the barrier; per the README it won't block async VACE execution.
    • Pulses at the seam - that's a v2.0.0 smoothing issue, handled by the Finalize node, not here. If the joins look wrong after finishing, start there.

    Real user reports say this thing works - one thread on the v2.0 release called the results "phenomenal" and the only complaint was the clip-prep step (name files sequentially, put them in one folder). That prep is the price of admission, and it's about 30 seconds.

    CategoryWAN VACE/Auto Joiner

    Inputs (5)

    NameTypeDefaultDescription
    loop_indexINT00–9999Index from For Loop Start (0-based)
    directorySTRINGDirectory containing the video files
    file_prefixSTRINGclipPrefix of the video files (e.g., 'clip' for clip_00001.mp4)
    first_suffixINT11–99999First sequence number of video files
    last_suffixINT21–99999Last sequence number of video files

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    statusSTRING
    is_completeBOOLEAN