H3 Temporal Insert (insert token-times, freeze originals) [experimental]
The de-rope done in latent space, so your good frames never get re-rendered
- samples
- samples
- noise_mask
- hold_map
- report
H3 Temporal Insert is the "why pay twice" version of the de-rope, and it's the most off-distribution thing in this pack, so read the warning first: it's experimental, and the model was never trained on what this node builds. But if you're willing to meet it on its own terms, it does something the pixel-space pipeline can't - it only re-renders the frames that are actually new.
The idea
The normal de-rope (H3 Time Smear) duplicates pixel frames, re-encodes a longer clip, and regenerates the whole dilated thing. Temporal Insert instead works on the latent: it expands the video latent along the time axis onto the dilated token grid, fills the inserted token-times by interpolating the neighbouring base tokens, and emits a repaint mask that freezes every original token (0) and regenerates only the in-betweens (1). You pay for the dilated token count once, and the frames you already have aren't re-drawn - the model only fills the gaps, like inpainting in time.
Inputs and the dials that matter
samples- the video latent from VAEEncode of the original (un-smeared) clip, or a nested AV latent.hold_map- the same map the oracles and H3 Time Smear speak; holds express where and how much to insert. Length snaps up to the 17k+5 grid exactly as Time Smear snaps it, and thehold_mapoutput is the already-snapped map - wire that one into H3 True Clock and the recover nodes, not the original.init_mode-lerp(default) linearly blends the bracketing base tokens, measured at corr 0.888 against the encode of the pixel-smeared clip;noisefills the inserted tokens with unit noise for pure inpainting.
Outputs: the expanded samples, the noise_mask (freeze originals / regenerate in-betweens), the snapped hold_map, and a report. expand_to_end (default on) fixes the end-jump when a map ends in a short rate-1 tail.
The three caveats, in order of how often they bite
- Denoise from sigma ≥ ~0.5. Below that the interpolation residual survives and you get ghosting. This isn't optional flavor; it's the operating envelope.
- Prefer hold spans starting on a 17-multiple (frames 0, 17, 34…). Inserted singleton tokens that land on those anchors are recovered exactly; off-anchor ones are the worst case.
- Audio is not retimed, and this is deliberate. v1 leaves H3's audio clock alone: a plain video latent gets a zero audio track sized for the dilated length. Take audio from elsewhere - the source clip, or H3 Audio Recover at reference_mix 1.0.
Install
Ships with matlowai/ComfyUI-MAINodes:
cd ComfyUI/custom_nodes
git clone https://github.com/matlowai/ComfyUI-MAINodes
Restart, under latent/minimax/motion. No extra Python deps; you need MiniMax-H3 weights and ComfyUI's H3 support (check the licence's US/EU/UK/Korea carve-outs).
Honest verdict: if you have the VRAM for the pixel-space pipeline, use the pixel-space pipeline - it's the tested, regression-locked path. Temporal Insert is for when the dilated pass is the thing that won't fit, or when you want the speed of only paying for the in-betweens. It's a real lever, but it's an experimental one, and the README says the node interfaces may still move.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | video latent from VAEEncode of the ORIGINAL (un-smeared) clip, or a nested AV latent | |
| hold_map | STRING | the oracles' / H3 Time Smear's hold map: per-world-frame integer holds. hold h means h token-times where there was 1 | |
| init_mode | COMBO | lerp | lerp: blend the bracketing base tokens (T2a: corr 0.888, fancier variants buy nothing). noise: unit noise, pure inpainting |
| expand_to_endopt | BOOLEAN | true | when the map ends in a SHORT rate-1 tail (<= 17 frames) after an expansion span, run that span through the last frame instead (kills the end jump). Uniform maps and longer rest tails are untouched |
| lengthopt | INT | 00–3600 | 0 = derive the base length from the latent (recommended); nonzero asserts this exact base length |
| noise_seedopt | INT | 00–18446744073709550000 | only used by init_mode 'noise'; fixed so the init is reproducible |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |
| noise_mask | LATENT | — |
| hold_map | STRING | — |
| report | STRING | — |