Nodes/ComfyUI-InfiniteTalk-MultiImage/Video Synth (Path List + Audio)
ComfyUI Node

Video Synth (Path List + Audio)

Frames on disk plus an audio file equals a finished video — with transitions

By xuhongming251·Created 10 months ago·Updated 14 days ago· 77
Video Synth (Path List + Audio)
  • audio
  • video_path
image_paths
frame_counts
fps25
filename_prefixvideo_output
format
enable_transitiontrue
transition_seconds0.50
transition_type

The ComfyUI-InfiniteTalk-MultiImage workflow generates its video the memory-friendly way: each image segment renders to a folder of frames on disk, one segment at a time. That leaves you with the fun part nobody wants to do by hand - muxing a pile of PNGs back into a video that's timed to your audio, and making the jump from one speaker to the next not look like a hard cut. This node, shown in the menu as "Video Synth (Path List + Audio)," is the pack's export stage.

The idea is simple. image_paths is a list of folders (or single image files), one per line. frame_counts is a list of how many frames each one contributes, also one per line. Give the node those plus an AUDIO input, and it assembles everything into a video whose total length matches the audio's. If a path is a folder, it reads every PNG/JPG/JPEG/BMP/WEBP inside, sorts them, and takes the first N frames (padding with the last frame if the folder is short of N). If it's a single file, it repeats that image N times. Then it works out the effective playback rate - total frames divided by audio duration - so the final clip lands exactly on the audio's last sample, and hands it to ffmpeg (libx264 video, aac audio at 192k) for the actual mux. The output lands in ComfyUI's output directory using filename_prefix, with a numbered suffix appended automatically if the file already exists, and the node returns the full video_path as a string.

The two inputs a beginner actually sets are image_paths and frame_counts - and they must line up. One frame count per path, or the node raises "路径数量与帧数数量不一致" (path and frame counts don't match). audio is whatever the workflow loaded from your track. fps (default 25) sets the output frame rate. format picks mp4, mkv, or mov.

Then there's the flourish: enable_transition, transition_seconds (0.05–5, default 0.5), and transition_type. When you have more than one image segment, the node replaces the frames at each boundary with a short transition instead of just cutting - crossfade (the sensible default), left/right wipes, slide left/right, zoom in/out, soft_blur, or random to pick one per boundary. It does all this in pure PIL with easing curves, which is charmingly old-school, and it keeps the total frame count stable while it does it.

The one real dependency to call out: this node shells out to ffmpeg, so you need it installed and on your PATH. On Windows that means downloading the build and adding it to your system PATH; verify with ffmpeg -version. The pack's own requirements.txt is empty - ffmpeg is the only thing this node can't live without. Install the pack itself via ComfyUI Manager (search ComfyUI-InfiniteTalk-MultiImage) or:

cd ComfyUI/custom_nodes
git clone https://github.com/xuhongming251/ComfyUI-InfiniteTalk-MultiImage

Where people get tripped up: transitions eat display time. A 0.5-second transition comes out of the images' screen time, so keep transition_seconds in the 0.3–1.0 range the README recommends, or you'll notice your speaker's segment getting visibly shorter. And because the node derives the playback rate from the audio length, a mismatch between your total frame count and the audio just makes the video play at an odd speed rather than erroring - if your output looks sped up or sluggish, that's the frame-count math, not ffmpeg. Also worth knowing: this node is generic. It doesn't care where the frames came from. If you generate segments with some other model and want the same transition-and-mux behavior, it'll happily do that too.

CategoryCustom/Video

Inputs (9)

NameTypeDefaultDescription
image_pathsSTRING
frame_countsSTRING
audioAUDIO
fpsINT251–120
filename_prefixSTRINGvideo_output
formatCOMBO3 options: mp4, mkv, mov
enable_transitionBOOLEANtrue
transition_secondsFLOAT0.500.05–5
transition_typeCOMBO9 options: crossfade, left_wipe, right_wipe, slide_left, slide_right, zoom_in, +3

Outputs (1)

NameTypeDescription
video_pathSTRING