Nodes/ComfyUI_MiniMax_H3_Extender/MiniMax H3 Tail From Latent
ComfyUI Node

MiniMax H3 Tail From Latent

Harvest a clip's ending as a video reference for the next one

By tritant·Created 11 days ago·Updated 4 days ago· 145
MiniMax H3 Tail From Latent
  • samples
  • vae
  • audio_vae
  • ref_video
  • ref_video_audio
  • last_frame
  • frame_count
  • duration_seconds
tail_seconds0.50
align_to_h3_gridtrue

Here's the neat trick that makes long H3 sequences feel continuous: take the end of the clip you just generated and feed it back in as a reference for the next one. MiniMax H3 Tail From Latent does exactly that, but it doesn't work with a rendered MP4 - it works directly on the raw H3 latent, before you ever touch a player.

What it does

You hand it a sampled H3 joint audio-video LATENT (the thing a sampler outputs), plus the vae and audio_vae. It decodes the tail of that latent into three usable artifacts:

  • ref_video (IMAGE): the last N seconds of the clip as a frame batch.
  • ref_video_audio (AUDIO): the matching slice of the clip's audio track.
  • last_frame (IMAGE): the single final frame, cloned out on its own.

Plus frame_count and duration_seconds so downstream nodes know what they got. That's a ready-made H3 video reference - wire ref_video and ref_video_audio into the Extender's ref_video_1 / ref_video_audio_1 (or any video-reference slot) and the next clip starts from where the last one stopped, motion, timing and audio included.

Two details make it less trivial than it sounds:

  • The H3 frame grid. H3 works on a 17k+5 frame structure, and by default align_to_h3_grid (on) rounds the requested tail up to a valid count - so a 0.5-second tail doesn't come out as a weird orphan count that H3's reference alignment rejects.
  • Audio normalization. The decoded audio is re-normalized by a 5× standard-deviation scaling pass, so the reference track arrives at a consistent level instead of whatever the raw latent happened to contain.

The inputs that matter

  • samples: the joint H3 LATENT from your sampler. Required.
  • vae / audio_vae: decode video and audio respectively.
  • tail_seconds: how long a tail to slice, default 0.5, range 0.1–15. Remember that with grid alignment on, the actual count rounds up to the nearest 17k+5 frame count, so a very short tail may come back a few frames longer than asked - that's the alignment working, not a bug.
  • align_to_h3_grid: leave it on unless you're hand-rolling a pipeline that manages frame counts itself.

When to reach for it

The Extender's own video-reference system already handles a lot of this internally - the README's example workflow is literally Get Video Components → images → ref_video_1. Where Tail From Latent earns its keep is outside the Extender, or at its edges: you want to chain H3 clips with your own sampler wiring, or you want to use the last frame of one scene as the image reference for an identity-sensitive next scene. The last_frame output is also handy as a plain image reference - same character, guaranteed to look like the clip that produced it, because it is the clip.

Install

Standard for the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/tritant/ComfyUI_MiniMax_H3_Extender.git

Restart ComfyUI (or Manager → MiniMax H3 Extender). No extra dependencies; you need the H3 weights (~42.5 GB) and both VAEs, and the usual license caveat applies - the H3 Community License excludes the US, EU, UK and South Korea from local weights.

The name undersells it. It's a tiny utility node, but it's the cleanest way to close the loop between one H3 clip and the next - which is the whole game when you're trying to get a minute of continuous video out of a model that only does 15-second takes.

CategoryMiniMax H3

Inputs (5)

NameTypeDefaultDescription
samplesLATENT
vaeVAE
audio_vaeVAE
tail_secondsFLOAT0.500.1–15
align_to_h3_gridBOOLEANtrue

Outputs (5)

NameTypeDescription
ref_videoIMAGE
ref_video_audioAUDIO
last_frameIMAGE
frame_countINT
duration_secondsFLOAT