ComfyUI Node

Join Videos

Stitch up to five clips into one video — and keep the audio honest

By Isi-dev·Created 2 years ago·Updated 10 months ago· 33
Join Videos
  • images_1
  • audio_1
  • images_2
  • audio_2
  • images_3
  • audio_3
  • images_4
  • audio_4
  • images_5
  • audio_5
  • images
  • audio
fps30

The name is refreshingly honest. Join Videos takes up to five clips - frame batches in one end, a single video out - and it carries audio along so your stitched clip doesn't come out silent. It's the rare video-adjacent node that remembers sound exists, and that's most of why you'd reach for it.

What it's for

In video-from-ComfyUI land you almost never generate one long clip. You make short shots - an AnimateDiff segment here, a second take of a character walking there - and then you need to glue them into a single sequence before you save anything. Join Videos is that glue. It sits in Isi-dev's animation toolkit alongside the move-foreground nodes and Video for LivePortrait, and it's designed to be the last stop before your video-save node.

The mechanism is simple: it takes the resolution of the first clip as the target, resizes and crops every other set to match, then concatenates all the frames into one tensor. Audio gets the same treatment - everything is resampled to the first clip's sample rate, and here's the nice touch: any clip you didn't provide audio for gets silent audio of exactly the right length. Frames and audio stay in sync because both are keyed to the same fps.

Inputs that matter

  • images_1 (required): the first clip's frames. Everything after this is optional.
  • images_2 through images_5: clips two through five. Leave the ones you don't use unconnected.
  • audio_1 through audio_5: one per clip, wired from whatever decodes your audio (typically a VHS audio input). Skip it and that segment gets silence.
  • fps: default 30, range 1–120. Sets the timing used to compute per-clip audio length, so set it to match what you're saving.

The outputs are images (the concatenated IMAGE batch) and audio (an AUDIO dict - or None if you fed no audio at all). Wire images into any video-save/combine node and audio into the audio input of your export path.

Install

Install it with ComfyUI Manager by searching ComfyUI-Animation_Nodes_and_Workflows, or clone it in:

cd ComfyUI/custom_nodes
git clone https://github.com/Isi-dev/ComfyUI_Animation_Nodes_and_Workflows

Then, with your ComfyUI environment active:

cd custom_nodes/ComfyUI-Animation_Nodes_and_Workflows
pip install -r requirements.txt

The real dependency list is torch, torchaudio, numpy, opencv-python, and mediapipe - torchaudio is the one that actually matters here since it's what makes the audio side work. Restart ComfyUI after installing.

Common issues

  • Your output is lower-res than some of your inputs. Because everything is resized to match the first clip, a 512×512 clip followed by a 1024×512 clip produces a 512×512 result. Decide which resolution you want and put that clip first.
  • No audio out when you expect it. If you never connected any audio input, the node returns no audio - it inserts silence only when at least one clip has audio. And a segment with no audio attached will be silent even if a later one isn't.
  • Out of memory on long compilations. Every batch is held in memory at once; the README's line about VRAM being the main limitation is real. Chaining Join Videos nodes handles any number of clips, but a single huge one can OOM - split it.
  • Red node when you load the pack's joinVideos workflow. You're missing another custom node. Install it via Manager; if the node still won't appear, check the CLI for the import error.
CategoryAnimation Assistant Nodes

Inputs (11)

NameTypeDefaultDescription
images_1IMAGE
audio_1optAUDIO
images_2optIMAGE
audio_2optAUDIO
images_3optIMAGE
audio_3optAUDIO
images_4optIMAGE
audio_4optAUDIO
images_5optIMAGE
audio_5optAUDIO
fpsoptFLOAT301–120

Outputs (2)

NameTypeDescription
imagesIMAGE
audioAUDIO