MiniMax H3 Latent Extend (continue clip)
Continuing a MiniMax H3 clip by growing the latent, not re-rolling from a still
- samples
- reference
- samples
- length
- report
You shot a 4-second clip and you want 7. The usual move is image-to-video: feed the last frame to the model and hope it invents a convincing continuation. The catch is that I2V sees one still and has to guess the motion that produced it - the camera drift, the speed, which way everything was heading. This node tries something more direct: it pads the latent along time, masks the new tail free, and lets the sampler attend to the whole original clip at every step while it writes the continuation. The run-up stays in the tensor, pinned, so the model is continuing the footage rather than restarting from a photograph of it.
How it works
Same mechanism as the pack's region rewrites, pointed along time instead of across the frame. MiniMaxH3LatentExtend takes your finished latent, grows the video tensor from T to a larger T', scales the audio up to match, and builds a noise mask where the original frames are pinned (0) and the new tail is free (1). Wire the result into the sampler as its latent_image and you get a continuation written against everything that came before it.
Read the fine print before you get excited, because the author is unusually honest about it: H3 was trained on fixed clip lengths, nothing promises it behaves at a seam manufactured this way, and the README says one successful 39→73-frame extension (held part at 37.3 dB, seam continuous) is not reproducibility. "Treat a good result as luck until it repeats," as the source puts it. This is an experimental seam, not a settled feature.
The inputs and outputs
samples- the finished clip to continue.extra_frames- rendered frames to add (default 34). The total is rounded up onto H3's17k+5grid, so the tail can come out a little longer than you asked. That's thelengthoutput's job to tell you about.strength- keep this at 1.0. The tooltip is blunt about why: lower values have nothing to pull back toward, because the new region starts empty.feather_latent_frames- softens the join (default 0.5). One latent frame is about three rendered frames, so fractions are fine here.reference/reference_frames(optional) - a video reference has to cover the whole generated length, or the prep node refuses the run later. Connect the reference here and the node caps the extension at what it can supply instead of letting you fail at the very end.reference_framesis the same cap typed in, for references that aren't aVIDEO;0means no cap.
Three outputs: samples (the grown latent, carrying its noise_mask), length (an INT you must feed to the conditioning node - the clip's length no longer matches the source), and report (a STRING that recaps old→new length and reminds you about the conditioning). It's an output node, so the report shows up on the canvas after the run.
When it caps you
If a reference is connected and it can't cover the extended length, the node silently caps length down and appends the reason to the report. If the cap leaves nothing to extend at all, it raises nothing to extend and tells you to supply a longer reference or disconnect it. That failure is by design - the constraint belongs in the graph, not in your head.
Install
ComfyUI Manager, search MiniMax H3 Inpaint Tools, or:
cd ComfyUI/custom_nodes
git clone https://github.com/panghea/ComfyUI-MiniMax-H3-Inpaint-Tools
cd ComfyUI-MiniMax-H3-Inpaint-Tools && pip install -r requirements.txt
Restart, find it under MiniMax H3/latent, and if you want a worked example the pack's 139_r2v_clip-extend-from-mp4.json workflow (in the repo's workflows/ folder) is the recorded run.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | The finished clip to continue. | |
| extra_frames | INT | 341–3600 | Rendered frames to add. The total is rounded up onto H3's 17k+5 grid, so the tail may come out a little longer than asked. |
| strength | FLOAT | 1.000–1 | 1.0 builds the tail from noise. Lower values have nothing to pull back toward - the new region starts empty - so keep this at 1.0 unless you are experimenting. |
| feather_latent_frames | FLOAT | 0.50–8 | Softens the join, in latent frames. One latent frame is about three rendered frames. |
| referenceopt | VIDEO | The video reference this run will use, if any. A reference has to cover the whole generated length, so connecting it here caps the extension at what the reference can supply instead of letting the run fail at the prep node. | |
| reference_framesopt | INT | 00–100000 | Same cap, typed in, for when the reference is not a VIDEO. 0 means no cap. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |
| length | INT | — |
| report | STRING | — |