MMH3 Temporal Extend Video
H3 Clips Longer Than H3 Will Hand You
- clip
- vae
- temporal_tile_config
- sample_params
- 2nd_sample_params
- overlap_params
- audio_vae
- latent_seg_0
- ref_image_slots
- merged_latent
- segment_latent
- segment_info
MiniMax H3 gives you 4-15 seconds. Everyone eventually wants a minute. The standard workaround, on every video model going back to AnimateDiff, is last-frame chaining: decode clip one, grab its final frame, feed it in as the first frame of clip two, repeat. It works and it drifts - you re-encode a decoded frame every round, the model re-invents details it already had, and the seam is a cut no matter how careful you are. That's the pain this node attacks.
This is the main event of the pack. Everything else - the tile editor, the sampler bundle, the overlap knobs - exists to feed it.
What it does differently
Instead of chaining in pixel space, it chains in latent space. A segment's sampling latent starts as a copy of the previous segment's tail, snapped to a video-token boundary on H3's keyframe grid, and the appended part is sampled freely. The carried tail isn't noise-conditioned or re-encoded; it's held in place by the latent noise mask - frozen zone, then a fade band, then free generation.
The grid arithmetic is the thing that trips people. H3's VAE codes 17 pixel frames per 5 latent tokens, so valid H3 lengths land on 17n+5: 5, 22, 39, 56, 73, 90, 107, 124. At 24 fps the default first segment of 124 frames is ≈ 5.2s, and continuations add 102 new frames ≈ 4.25s. It's the same class of trap as Wan's 4n+1 rule with a different constant, and the pack snaps values for you rather than letting you fail at sampling time.
Within a segment, the mask value becomes each token's timestep label and mixes that token's input, so a constant band of mask reads as "partially preserved content". A frozen zone, a gradient band and free tokens then coexist in one sampling pass, and a seam anchor can pin the conditioning at the split frame so the join doesn't wander.
The inputs that matter
clip (the H3 CLIP that builds each segment's conditioning), vae (the H3 video VAE that encodes reference images and keyframes), temporal_tile_config from MMH3 Temporal Tile Editor, and sample_params from MMH3 Sample Params. That's the spine.
Optional, in rough order of how often you'll want them: overlap_params (either overlap node), audio_vae (needed only when a segment references an audio file; latent-level references like "previous audio" don't need it), 2nd_sample_params (a refinement pass that re-denoises a whole continuation segment at low denoise with no mask and no keyframes), latent_seg_0 (extend an H3 latent you already have instead of starting fresh), and ref_image_slots (the tile editor's wired image sockets). second_pass_audio picks whether the stitched soundtrack comes from the second pass or the untouched first pass.
Outputs and where they go
merged_latent is the accumulated timeline - this is your video. segment_latent is the last segment standing alone, which is what you want when you're inspecting just the piece that ran. segment_info is a summary dict: session directory, files written, split points, sampling stages.
H3 latents are audio-visual pairs (video and audio in one nested tensor), so decode both: video VAE into VAEDecode, audio VAE into VAEDecodeAudio, then CreateVideo at 24 fps and SaveVideo.
Every finished segment is also written into the session directory as a .h3latent plus a preview WebP, which is what makes resume and re-rolls possible: lock the segments you like, unlock the one you don't, and only that one re-samples. Earlier attempts are kept.
Install
ComfyUI Manager → search Comfyui-MMH3-UltimateExtend → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/bbaudio-2025/Comfyui-MMH3-UltimateExtend
No dependency install - the pack leans on ComfyUI's own torch/PIL and the H3 support in core. What you need on disk is the H3 stack: diffusion model, CLIP, and the video and audio VAEs. The H3 weights ship under a community licence that voids the grant in the US, EU, UK and South Korea, outputs included.
Two caveats before you invest time. The README carries an explicit work-in-progress warning - sockets, parameters and on-disk formats may change between commits - and this is version 0.0.2. And the spatial half of the pack (MMH3 Spatial Extend Video) is still under development; the temporal chain is the usable part.
Common problems
The errors here are unusually explicit, because they're mostly raised by the node itself:
FL2VA needs a VAE- a segment is using a first/last frame as a keyframe but no video VAE is connected. Without it the frame would only reach the text encoder and the output would quietly ignore it, so the node refuses rather than lying to you.the 'bgm' audio reference mode needs a VAEorreads the song from the 'audio_BGM' input ... which is not connected- a segment is set to take its soundtrack from theaudio_BGMsocket of the tile editor. Either the song isn't wired oraudio_vaeis missing.resume_from_segment=N but no stored merged latent found- you're resuming from a session with no saved state. Run the chain once. Related: ifstorage_locationistemp, those files are cleared when ComfyUI restarts, so a session you meant to come back to is gone. Useoutput/latentsfor anything long-lived.fade_frames=... exceeds the realized tail length- your fade band is longer than the tail you actually carried. Lower the fade or raise the segment'soverlap framesin the editor.latent_seg_0 must be a MiniMax H3 AV latent- you fed it a plain video latent or an image latent. It wants an H3 audio-visual latent, batch size 1.- Import fails outright - an older ComfyUI that predates MiniMax H3 support and the
comfy_api.latestschema. Update core. - You hear "it's slow" - that's H3, not this node. Chaining multiplies full sampling passes, and every segment gets a decode on the end.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | MiniMax H3 CLIP - builds every segment's conditioning (prompt, keyframes, references) internally. | |
| vae | VAE | MiniMax H3 Video VAE - encodes reference images / keyframes for the per-segment conditioning. | |
| temporal_tile_config | DICT | Per-segment configuration from the 'MMH3 Temporal Tile Editor' node. | |
| sample_params | MMH3_SAMPLE_PARAMS | Sampling parameters from the 'MMH3 Sample Params' sub-node: a HIGH stage (noise injection) plus an optional LOW stage (no noise). | |
| second_pass_audio | COMBO | second | Which pass's AUDIO track is stitched when the second pass is enabled: 'second' = the re-denoised audio, 'first' = the untouched first-pass audio (the video always comes from the second pass). |
| 2nd_sample_paramsopt | MMH3_SAMPLE_PARAMS | OPTIONAL sampling parameters for the second (refinement) pass on continuation segments: the whole segment latent (carried tail + new content, video AND audio) is re-denoised with NO video noise mask and NO keyframes - references (images, seam reference) stay active. In 'bgm' audio reference mode the audio keeps its all-zero mask, so the music stays frozen while the video re-samples. Use a low-denoise sigma schedule (e.g. SplitSigmas 'low' output) to pull the accumulated content back toward the model manifold. Unconnected = disabled. | |
| overlap_paramsopt | MMH3_OVERLAP_PARAMS | OPTIONAL global tail/fade/anchor/overlap parameters applied to every continuation segment - from the hand-tuning 'MMH3 Temporal Overlap Params' sub-node or the one-click 'MMH3 Temporal Overlap Simple' (same socket, use only one). When unconnected, the defaults (or the Tile Editor's legacy global extend_params) are used. | |
| audio_vaeopt | VAE | MiniMax H3 Audio VAE - needed only when a segment references an audio FILE (audio reference mode 'load audio', or a ref video soundtrack). The latent-level audio references ('previous audio' / 'initial audio') need NO audio VAE. Without it file-based reference audio only conditions the text encoder. | |
| latent_seg_0opt | LATENT | OPTIONAL fully-sampled H3 AV latent to continue from. When connected together with resume_from_segment=0, segment 0 EXTENDS this latent instead of starting fresh; with resume > 0 the session's stored merged latent is used and this input is ignored. | |
| ref_image_slotsopt | MMH3_REF_IMAGES | OPTIONAL reference images wired into the 'MMH3 Temporal Tile Editor' (its 'ref_image_slots' output): one record per connected socket at its NATIVE resolution, in slot order. Every segment uses them as 'load images' references except for the sockets it ruled out in the editor, each sized by that segment's 'reference image size' ('match' / 'max', aspect preserved) - the exact same path as the files picked in the dock panel. 'First_or_Ref_Image_0' / 'Last_or_Ref_Image_1' also serve as segment 0's FL2VA first/last frame when no file is picked for them. One socket is one '<Picture i>': a socket fed by a batch contributes its FIRST image only (the MiniMaxH3 Reference to Video convention). Unconnected = only the editor's picked files are used. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| merged_latent | LATENT | The accumulated video: all segments stitched on one timeline (the final merged state; each run also stores it as merged_<seq>.h3latent, and with every segment locked it is reloaded from the session). |
| segment_latent | LATENT | The LAST segment as a standalone latent (its carried tail + the frames it generated) - NOT the merged timeline. With every segment locked it is reloaded from the session's stored segment latent, so a fully locked chain still reports the last segment here instead of duplicating merged_latent. |
| segment_info | DICT | Per-segment execution summary: session directory, files written, split points, sampling stages. |