Video Batch Concat (PMS)
Stitch scene frames and audio into one timeline
- images
- audio
- images
- audio
- total_frames
The natural end of the story-pipeline pattern: you generated five scenes, each with its own video frames and its own narration audio, and now you want one continuous clip. This node takes the list of image batches and the list of audio tensors and concatenates them into a single IMAGE batch and a single AUDIO tensor - with an optional silence gap inserted between scenes.
It's the frame-level sibling of PMS_DualPromptListBatch. That node splits your script into paired scenes; this one glues the rendered results back together. It's marked as a list-input node, so it expects the lists coming out of per-scene generation (or from a batch-splitting node), not single tensors.
How it works
Two independent joins:
- Images: every scene's image batch is concatenated along the batch axis, so the output is one long IMAGE tensor - that's your video, frame by frame. It refuses to mix resolutions: if any scene's frames differ in height/width from the first, it raises instead of silently producing garbage.
- Audio: all the audio waveforms are concatenated end-to-end. If
silence_msis set and there's more than one audio clip, it inserts that many milliseconds of digital silence between each pair of scenes, so narration doesn't butt directly against the next scene's line.
It also returns total_frames (the combined frame count), which is handy for computing duration or feeding a VHS save node.
The inputs that matter
- images - the list of IMAGE batches (required wire input).
- audio - the list of AUDIO tensors (required wire input).
- silence_ms - 0–5000ms of padding between scenes. Start at 0 to sanity-check alignment, then add 200–400ms for natural narration pacing.
Outputs: images, audio, and total_frames (INT). Feed the merged images+audio into a video save/encode node (VHS or similar) to write the finished file.
Installing it
ComfyUI Manager → search "COMFYUI_PROMPTMODELS" → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS
No API key needed - pure tensor utility. ComfyUI >= 0.26.0 and a restart are all it takes.
The traps
Mismatched resolutions are the #1 error, and the node is deliberately strict about it: every scene must have identical frame height and width or it raises. If you're mixing a 16:9 image generator with a 9:16 one, normalize before this node, not after.
Also watch sample rates in the audio join - it uses the first clip's sample_rate as the reference for both the silence padding and the merged output. If scenes have different sample rates, the result will be subtly wrong. And remember: this concatenates along the timeline, it doesn't interleave or crossfade. If you want a fade between scenes, do that upstream on the image side before this node joins them.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| audio | AUDIO | — | |
| silence_ms | INT | 00–5000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| audio | AUDIO | — |
| total_frames | INT | — |