Nodes/ComfyUI-MAINodes/H3 Temporal Insert (insert token-times, freeze originals) [experimental]
ComfyUI Node

H3 Temporal Insert (insert token-times, freeze originals) [experimental]

The de-rope done in latent space, so your good frames never get re-rendered

By matlowai·Created 17 days ago·Updated about 18 hours ago· 112
H3 Temporal Insert (insert token-times, freeze originals) [experimental]
  • samples
  • samples
  • noise_mask
  • hold_map
  • report
hold_map
init_modelerp
expand_to_endtrue
length0
noise_seed0

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 the hold_map output 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; noise fills 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

  1. 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.
  2. 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.
  3. 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.

Categorylatent/minimax/motion

Inputs (6)

NameTypeDefaultDescription
samplesLATENTvideo latent from VAEEncode of the ORIGINAL (un-smeared) clip, or a nested AV latent
hold_mapSTRINGthe oracles' / H3 Time Smear's hold map: per-world-frame integer holds. hold h means h token-times where there was 1
init_modeCOMBOlerplerp: blend the bracketing base tokens (T2a: corr 0.888, fancier variants buy nothing). noise: unit noise, pure inpainting
expand_to_endoptBOOLEANtruewhen 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
lengthoptINT00–36000 = derive the base length from the latent (recommended); nonzero asserts this exact base length
noise_seedoptINT00–18446744073709550000only used by init_mode 'noise'; fixed so the init is reproducible

Outputs (4)

NameTypeDescription
samplesLATENT
noise_maskLATENT
hold_mapSTRING
reportSTRING