Nodes/ComfyUI-RvTools_v2/Seamless Join Video Clips v2
ComfyUI Node

Seamless Join Video Clips v2

Stitch two clips into one WanVideo-friendly shot

By r-vage·Created about a year ago·Updated 5 months ago· 23
Seamless Join Video Clips v2
    • image
    • mask
    frame_load_cap81
    mask_first_frames10
    mask_last_frames0
    video_filelist

    Video is where ComfyUI stops being a nice-to-have and becomes the only practical tool - and this node is a niche piece of that world. Seamless Join Video Clips v2 takes two video files, joins them into a single image sequence, and produces a matching mask that marks the transition zone. That output pair is exactly what a WanVideo VAE workflow wants when you're trying to make a camera cut look like one continuous shot instead of two clips slammed together.

    How it works

    The node reads a comma-separated list of file paths from video_filelist, then joins the first and last clips in that list (it ignores anything in the middle - worth knowing before you get clever with a five-clip playlist). It loads frames from both with OpenCV, then assembles:

    • Frames from the end of the first clip, a stretch of solid grey frames (mid-gray #7F7F7F), then frames from the start of the second clip - forming one continuous image sequence.
    • A matching mask sequence where the grey transition frames are white and everything else is black - so the video VAE knows exactly which frames hold the seam to smooth over.

    Both come out as tensors: image (the joined clip) and mask (the transition mask), sized to the videos you fed in. Because the mask is returned as an RGB image rather than a grayscale MASK type, it drops into nodes that expect an IMAGE input without a conversion dance.

    The inputs that matter

    • frame_load_cap (default 81) - how many frames to chew on from each clip. It's a ceiling, not a hard target; the node reads up to double this per clip to have room for the seam.
    • mask_first_frames (default 10) - how many grey/white transition frames to place at the start of the join.
    • mask_last_frames (default 0) - same, for the end. Together these define how long the masked crossfade zone is. Longer mask = smoother transition, but a bigger blurry bridge for the model to repair.
    • video_filelist - the comma-separated paths to your clips. Optional input; if you leave it empty nothing runs, so in practice you'll always wire or type it.

    One implementation detail that affects you: the node returns float("NaN") from its change-check, so it always re-executes - every queue run re-reads the videos. That's deliberate (fresh processing), but it means it's not something you want on a giant batch if you can avoid it.

    Installing it

    Part of the RvTools v2 pack. This one actually leans on the dependency list: it uses OpenCV (opencv-python in the pack's requirements.txt) plus numpy/torch/Pillow - all installed automatically via ComfyUI Manager (search RvTools → install ComfyUI-RvTools_v2, restart), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/r-vage/ComfyUI-RvTools_v2
    

    Restart and confirm RvTools v2: Version 2.5.x in the console. No model files are downloaded by this pack - the WanVideo VAE it feeds is a separate model you load yourself.

    Troubleshooting

    • "Video file not found." The paths in video_filelist must be absolute or resolvable from ComfyUI's working directory - a filename alone usually isn't enough. Also note the list is split on ", " (comma-space); a missing space breaks the parsing.
    • Only the first and last clips are used. Feed it more than two videos and the middle ones are silently ignored. That's by design, but it surprises people.
    • Missing opencv. If the node errors on import cv2, the pack's dependencies weren't installed - reinstall through Manager so requirements.txt gets processed. (The README once advertised a PyAV dependency the shipped code doesn't actually use; the real requirement here is OpenCV.)
    • Old v1 RvTools references fail in Manager - the original repo was deleted, and the author has moved development to ComfyUI_Eclipse.
    Category🫦 RvTools II/ Video

    Inputs (4)

    NameTypeDefaultDescription
    frame_load_capINT811–10000
    mask_first_framesINT100–1000
    mask_last_framesINT00–1000
    video_filelistoptSTRING

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    maskIMAGE