Nodes/ComfyUI-MAINodes/H3 Window Loop (rolling regen, one node) [alpha]
ComfyUI Node

H3 Window Loop (rolling regen, one node) [alpha]

The whole de-rope chain, inside one node, on a VRAM leash

By matlowai·Created 17 days ago·Updated about 18 hours ago· 112
H3 Window Loop (rolling regen, one node) [alpha]
  • model
  • positive
  • vae
  • audio_vae
  • sampler
  • sigmas
  • images
  • guider
  • baseline_audio
  • images
  • audio
  • plan
  • report
noise_seed0
hold_map
budget_dilated124
handle_frames12
pin_frames6
feather_frames6
fps24
seed_stride1
draft_width0
draft_height0
upscale_methodlanczos
on_interruptraise (stock behaviour)
plan_onlyfalse
audio_rms_search_ms12
s_per_step0.00

MiniMax H3 smears fast motion, and the fix that makes sense of it - the de-rope - is expensive. The whole Motion Lab pipeline slows a clip down on its own time axis, regenerates it video-to-video at partial denoise, then drops the held frames to recover the original frame rate. That's roughly eight nodes wired in a chain. On a clip with a lot of fast action, the dilated clip (the slowed one) can be several times longer than the original, and holding that whole thing in VRAM at once is exactly what blows up a mid-size card.

H3 Window Loop is the one-node answer: it plans the dilated clip into rolling windows that each fit a budget you set, runs the entire per-window chain internally, and splices the world back together. One node replaces the whole graph for people who don't want to build it, or for cards that can't hold it.

What the node actually runs

Internally it does time smear → VAE encode → V2V init → sample → decode → exact recover → audio recover → splice, per window, then hands you the assembled clip. Because that chain runs inside, the node needs the sampler's ingredients as inputs rather than a pile of images. The ones that matter:

  • model, positive, vae (video VAE) and audio_vae (for the jointly generated foley)
  • sampler and sigmas - the tooltip says it plainly: these should be the injected sigmas from H3 Inject Schedule, that's the whole point
  • images - the baseline frames on the world clock
  • hold_map - from the jerk oracle, H3 Manual Hold Map, or H3 Motion Editor
  • budget_dilated - the knob. It's counted in dilated frames, not world frames, because dilated length is what sets both the bill and the VRAM peak. Default 124.

Run it once with plan_only on and the report output prices every window before you pay for any of them. This is the step people skip and then regret.

Cold seams and hot seams

The planner's seam policy is the same one the whole window family shares. A boundary between bursts is a cold cut - both handles sit at hold 1, so the splice crossfades real-time baseline context, the shipped single-window behaviour repeated N times. A boundary forced inside a burst is a hot cut and gets pin-and-trim instead: the next window regenerates an overlap seeded from the already-recovered world, uses it as context, then throws it away, leaving a hard cut at a pinned frame. Hot audio is a hard cut at the local RMS minimum, never a crossfade - two independent foley takes of one moment can't be dissolved, and the node knows it.

What rides along, and what doesn't

MODEL-domain patches - LoRAs, attention patches, chunked feed-forward - apply, because you wire them upstream into model. SAMPLER wrappers too. IMAGE-domain nodes inside a loop body can't, by construction. The common one people want, an ImageScale between smear and encode, is replicated by the draft_width/draft_height widgets. Anything else you wanted in the loop just isn't reachable from here.

Installing and other notes

This ships in ComfyUI-MAINodes (GPL-3.0, MiniMax-H3 nodes by matlowai). No Python deps of its own:

cd ComfyUI/custom_nodes
git clone https://github.com/matlowai/ComfyUI-MAINodes

Restart ComfyUI. Alpha nodes like this load behind a guarded loader so a broken one can't take the pack down - check the README for the "alpha, expect interfaces to move" caveats. It's deliberately one of three rolling-window implementations shipped side by side (the requeue pair in motion.py and this one), and the pack says to expect at most one to survive. Don't build a house on it. Interrupt lands at the next sampler step, not the next window; set on_interrupt to return partial world if you'd rather keep the windows that already landed than lose the run.

Categoryimage/minimax/motion

Inputs (24)

NameTypeDefaultDescription
modelMODELpatched however you like: LoRAs, attention patches and chunked feed-forward all ride along
positiveCONDITIONING
vaeVAEvideo VAE
audio_vaeVAEaudio VAE, for the jointly generated foley
samplerSAMPLER
sigmasSIGMASfrom H3 Inject Schedule; the whole point is that these are the INJECTED sigmas
noise_seedINT00–18446744073709550000
imagesIMAGEbaseline frames, world clock
hold_mapSTRINGfrom the oracle, H3 Manual Hold Map or H3 Motion Editor
budget_dilatedINT12439–3600max DILATED frames per window; the VRAM and cost dial
guideroptGUIDERoverrides model+positive; wire your own guider to keep control of conditioning
baseline_audiooptAUDIOthe baseline clip's track; unwired, the world starts as silence
handle_framesoptINT122–48real-time context frames on each COLD edge
pin_framesoptINT62–48overlap regenerated then discarded at each HOT edge (pin-and-trim)
feather_framesoptINT60–24crossfade width inside a COLD handle; hot edges ignore it by policy
fpsoptINT241–120
seed_strideoptINT10–1000seed offset per window; 0 = every window on the same seed
draft_widthoptINT00–40960 = off. Replicates the ImageScale that community loop bodies put between smear and encode
draft_heightoptINT00–4096
upscale_methodoptCOMBOlanczos5 options: lanczos, bicubic, bilinear, area, nearest-exact
on_interruptoptCOMBOraise (stock behaviour)2 options: raise (stock behaviour), return partial world
plan_onlyoptBOOLEANfalseprice the plan and stop; images pass through untouched
audio_rms_search_msoptFLOAT120–200how far a hot audio cut may slide to land on a local RMS minimum
s_per_stepoptFLOAT0.000–120

Outputs (4)

NameTypeDescription
imagesIMAGE
audioAUDIO
planSTRING
reportSTRING