H3 Infinite - Stitch Saved Chain v1.2
The memory-bounded stitcher for long H3 projects
- video_vae
- audio_vae
- video_path
- stitch_info
Every H3 clip tops out at a few seconds, so a "long" video is really a stack of clips. H3 Infinite - Stitch Saved Chain v1.2 is the node that assembles that stack at the very end, from latents you saved along the way. Its superpower is right in the name: it's memory-bounded. It decodes one saved AV latent at a time and encodes straight to MP4, so your VRAM (and RAM) usage stays flat no matter whether you're stitching 3 clips or 30. No giant all-clips-in-memory batch, no decoding an entire project just to join it.
The workflow it expects is the classic "generate clip by clip" pattern: make each clip with the Start/Continue nodes, save each one with H3 Infinite - Save AV Latent keeping sequential indices (clip_00001.safetensors, clip_00002.safetensors, …), then run this node once at the end. It reads each saved full video+audio latent, decodes it with the MiniMax H3 VAEs, and writes an H.264/AAC MP4 directly to your output folder.
The inputs that matter
video_vae/audio_vae- the MiniMax H3 Video VAE and Audio VAE used to decode the saved latents. Wire the same ones you generated with.latent_prefix- where the saved clips live, relative to ComfyUI'soutputfolder. Defaulth3_continuous/clipmatches the naming in the example workflows.first_clip/last_clip- the range to stitch. Setlast_clipto0and it automatically uses the highest numbered clip it finds for that prefix, which is handy mid-project.filename_prefix- where the finished MP4 goes (video/Herrgotts_H3_Infinite_Stitchedby default).video_crossfade_frames(4 recommended) andaudio_crossfade_ms(15 recommended) - the seam smoothing. Short context-aligned video blend plus a brief audio de-click crossfade so joins don't pop.crf- H.264 quality, 18 is the high-quality default. Lower = bigger/lossless-er, higher = smaller.max_safe_tail_bridge_frames(2 recommended) - this is the v1.2 seam-repair knob. H3's latent phase alignment sometimes discards a couple of perfectly good rendered frames at a boundary; Safe Tail Bridge reuses up to N detector-approved frames from the previous clip and skips the same number of early frames in the next one, instead of just dropping them.luminance_matchand friends - an experimental fallback only. Off by default. Only reach for it if a persistent brightness seam shows up at joins; the Safe Tail Bridge path is the intended default.
What it hands you back
Two outputs: video_path (the full path to the written MP4) and stitch_info (a summary string describing what it did, including per-clip trims and seam choices).
Where people get burned
- It needs PyAV. The node imports it lazily, and it's normally present because it's part of current ComfyUI's video/audio stack - but if you're on a stripped-down install you'll get a "PyAV is required" error. That's not a pack bug; install/update PyAV.
- Everything must match across clips. Same resolution (and even dimensions - H.264 requires it), same audio sample rate, and audio must be mono or stereo. Mix resolutions mid-chain and it errors rather than rescale for you.
- Ambiguous prefixes. If you saved chains into overlapping folders, it refuses to guess and tells you to use the exact
latent_prefix. - Don't restart mid-range. Keep indices sequential;
last_clip = 0is a convenience for "up to the highest", not a fix for skipped numbers.
Install the whole pack via ComfyUI Manager (search Herrgotts-H3-Infinite-Continuation-Suite) or
cd ComfyUI/custom_nodes
git clone https://github.com/HerrgottMargott/Herrgotts-H3-Infinite-Continuation-Suite.git
then restart ComfyUI. The pack has no model weights - the MiniMax H3 files come from Comfy-Org's repo - and no extra pip dependencies beyond what ComfyUI already ships.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| video_vae | VAE | MiniMax H3 Video VAE used to decode the saved full video latents. | |
| audio_vae | VAE | MiniMax H3 Audio VAE used to decode the saved full audio latents. | |
| latent_prefix | STRING | h3_continuous/clip | Saved latent prefix relative to ComfyUI/output, e.g. h3_continuous/clip for clip_00001.safetensors, clip_00002.safetensors, ... |
| first_clip | INT | 11–99999 | — |
| last_clip | INT | 00–99999 | 0 = automatically use the highest numbered clip for this prefix. |
| filename_prefix | STRING | video/Herrgotts_H3_Infinite_Stitched | — |
| video_crossfade_frames | INT | 40–16 | Context-aligned video crossfade. Recommended: 4 frames. |
| audio_crossfade_ms | FLOAT | 150–100 | Short audio de-click crossfade. Recommended: 15 ms. |
| luminance_match | BOOLEAN | false | Experimental fallback only. Safe Tail Bridge is the release default; enable only if a persistent brightness seam remains. |
| luminance_fade_frames | INT | 160–96 | Frames over which the temporary brightness correction returns to native luminance. Recommended: 16. |
| max_luminance_correction_percent | FLOAT | 10.00–25 | Safety clamp for automatic brightness correction. Recommended: 10%. |
| crf | INT | 180–51 | H.264 quality. Lower = larger/higher quality. 18 is a high-quality default. |
| max_safe_tail_bridge_frames | INT | 20–4 | Recommended: 2. Keeps only detector-approved rendered frames lost to phase alignment, then skips the same number of early video frames in the next clip. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video_path | STRING | — |
| stitch_info | STRING | — |