Nodes/H3 LongTake/H3 LongTake Stitch
ComfyUI Node

H3 LongTake Stitch

Glue the clips together and get your audio back

By mark9009·Created 5 days ago·Updated about 20 hours ago· 21
H3 LongTake Stitch
  • source_audio
  • path
  • report
project_namelongtake
output_namelongtake_final
audio_file
expected_clips0
project_dir

This is the unglamorous half of the LongTake pair, and you need it. The Render node can only hold one clip in VRAM at a time, so it does the sensible thing and writes clip_000.mp4, clip_001.mp4 and so on straight to disk. Somebody has to put them back together. That's H3 LongTake Stitch - it concatenates the chunks, drops the original soundtrack back on top, and hands you a single file in ComfyUI/output/.

What it's actually doing

Two things, both deliberately cheap. First, concatenation with ffmpeg's concat demuxer and no re-encoding - the chunks were already encoded once when the Render wrote them (at chunk_crf, default 10), and running them through another pass would cost you time and a generation of quality for nothing. The seams come out as the Render left them.

Second, audio. H3 generates its own native audio, but for a source-driven job you almost always want the source's original track back under it - lip-sync, music, whatever the clip came with. The Stitch pulls it from the project (or from a file you pick, or an AUDIO you wire in) and muxes it at the video's length. One rule the README states plainly and the code enforces: the audio is cut to the video, never the video stretched to the audio. If your audio runs long, it ends early.

It also embeds the workflow tags into the output mp4, exactly like core SaveVideo does. Drop the finished file onto ComfyUI and you get the graph back. And since it's an output node, the result plays in the node's preview.

Inputs and outputs

project_name and output_name are the two required fields - the latter becomes output/<output_name>.mp4.

The rest is optional and mostly about wiring:

  • project_dir - the one you actually want. Connect the Render's project_dir output and this socket replaces project_name and runs the Stitch immediately after the Render in the same queue. Once you're past testing, that's the setup: one queue, source video in, finished mp4 out.
  • audio_file - defaults to (auto from project), i.e. whatever source audio the Render saved. (no audio) gives you a silent result. You can also pick or upload a video from input/ to steal a track from.
  • source_audio - an AUDIO socket that takes priority over auto if you'd rather feed it from another node.
  • expected_clips - 0 means "use the plan the Render saved". Set it only if you deliberately want to stitch a shorter run.

Outputs are path (STRING) and report (STRING). There's nothing downstream to wire them into; they're for chaining and for reading, and the report line is worth glancing at because it tells you exactly how many clips went in and where the audio came from.

Installing it

Same pack, same install - no separate dependency:

cd ComfyUI/custom_nodes
git clone https://github.com/mark9009/ComfyUI-H3-LongTake

Or search H3 LongTake in ComfyUI Manager, then restart. The only external thing it needs is ffmpeg, resolved the same way the Render resolves it: VideoHelperSuite's ffmpeg if that pack is installed, otherwise the imageio-ffmpeg Python binary, otherwise ffmpeg on PATH. Nothing else, and no requirements.txt to trip over - which is genuinely nice, since dependency conflicts are the most common way a node pack breaks your whole install.

Where people get burned

Honestly, less than with the Render node - this one mostly does what you tell it. But:

It won't stitch an incomplete project. It checks clip_000 through clip_{N-1} and raises "Generate all the clips first" if any are missing. Since the Render resumes from the first missing clip, just re-queue it.

No plan means it reports instead of failing. With no plan.json in the project and expected_clips left at 0 you get a "nothing to stitch" message and an empty path. That's deliberate, so an unmuted Stitch doesn't blow up a dry_run - and it's the cause if your output is mysteriously blank.

Output files are never overwritten. Run it twice and you get output_name_001.mp4.

A moved or deleted source assembles silently without audio. The project stores a path back to the source; if it's gone you get a logged warning and a silent mp4. Read the report string rather than assuming you'll hear something.

Don't merge two projects. The no-re-encode path needs homogeneous streams - same resolution, codec and frame rate. Chunks from one Render run always are; chunks from two runs with a different canvas or clip_frames aren't.

And the one that catches everyone first: in the shipped example workflow the Stitch node is muted. Ctrl+M, or you'll render an hour of clips and wonder why nothing assembled.

CategoryH3 LongTake

Inputs (6)

NameTypeDefaultDescription
project_nameSTRINGlongtake
output_nameSTRINGlongtake_final
audio_fileoptCOMBOauto: audio of the source used by the Render (saved in the project). Or pick/upload a video to take the audio from.
source_audiooptAUDIOAlternatively: the original audio as AUDIO (takes priority over auto).
expected_clipsoptINT00–99990 = use the plan saved in the project.
project_diroptSTRINGConnect the Render's project_dir output: replaces project_name and runs the Stitch after the Render.

Outputs (2)

NameTypeDescription
pathSTRING
reportSTRING