Nodes/ComfyUI-MAINodes/H3 Window Expand (rolling regen)
ComfyUI Node

H3 Window Expand (rolling regen)

Rolling regeneration for clips too long for your VRAM

By matlowai·Created 17 days ago·Updated about 16 hours ago· 112
H3 Window Expand (rolling regen)
  • images
  • vae
  • noise
  • guider
  • sampler
  • sigmas
  • audio_vae
  • baseline_audio
  • images
  • audio
  • report
hold_map
max_dilated_frames209
handle_frames12
feather_frames6
fps24
reference_mix0.00
hot_cutpin-and-trim (default)
snap_search8
max_windows12
grid_growthtrue
plan_onlyfalse
s_per_step0.00
est_steps18

H3 Window Expand is the "one queue item, budgeted windows" answer to the de-rope's VRAM wall. The problem it solves is arithmetic: the dilated pass is what you're sizing for, not the clip you typed, and at long lengths the dilated pass stops fitting. Rather than split the work across queue items by hand, this node reads the hold map, splits the held material into windows no larger than max_dilated_frames dilated frames each, and returns an expanded graph containing the whole segment recipe once per window - crop, smear, encode, v2v init, sample, decode, recover - plus a chained H3 Segment Splice that writes each recovered window back over the world. Press queue once.

The budget is in dilated frames, and that's the whole trick

max_dilated_frames (default 209) is the per-window budget in smeared frames, because that's what sets the bill and the VRAM peak - not the runtime, not the world length. The README's instruction is to read H3 Time Smear's report on a full-clip pass and set the budget below the length that fits your card. The other inputs are the standard pipeline kit: images, hold_map, vae, noise, guider, sampler, sigmas (from H3 Inject Schedule; every window uses it), plus handle_frames (12) and feather_frames (6).

How the seams work

Boundaries snap to cold cuts (hold 1 on both sides), then to token boundaries, and never land inside a ramp shoulder. When no cold cut fits the budget, the plan says so in the report and falls back to hot_cut - default pin-and-trim: the next window's leading handle is generated as context at the same hold rate, then discarded, and the splice makes a hard cut instead of dissolving two takes of the same fast motion. crossfade and refuse are the alternatives if you'd rather not.

Because everything except the hold map is passed as a raw link and rewired into the expansion, the model, guider, sampler, and VAE load once and are shared by every window - and per-window nodes keep normal caching, so requeueing after changing one widget leaves unchanged windows as cache hits. plan_only (default false) returns the baseline untouched with the plan attached, so you can read the report and price the pass before paying for it. Optional audio_vae and baseline_audio upgrade the windows from video-only to joint AV.

Install

Ships with matlowai/ComfyUI-MAINodes:

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

Restart, under image/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). Example graphs also expect ComfyUI-KJNodes.

The honest note: this is one of three deliberately competing window implementations in the pack (Window Expand, the Window Plan/Collect requeue pair, and the older rolling graph), and the author expects at most one to survive. If you're choosing, Window Expand is the single-click path - but "the queue is the loop driver" lives in the collect pair, and crash-resilience (one window lost, not the run) is on their side. Match the failure mode you're most afraid of.

Categoryimage/minimax/motion

Inputs (21)

NameTypeDefaultDescription
imagesIMAGEbaseline world frames
hold_mapSTRINGfrom the oracle, H3 Manual Hold Map or H3 Motion Editor
vaeVAEvideo VAE
noiseNOISE
guiderGUIDER
samplerSAMPLER
sigmasSIGMASH3 Inject Schedule; every window uses it
max_dilated_framesINT20939–4000budget per window, in DILATED frames
handle_framesINT122–48
feather_framesINT60–24crossfade width at COLD seams; hot seams are hard cuts
audio_vaeoptVAEaudio VAE; unwired means video-only windows
baseline_audiooptAUDIO
fpsoptINT241–120
reference_mixoptFLOAT0.000–1
hot_cutoptCOMBOpin-and-trim (default)3 options: pin-and-trim (default), crossfade, refuse
snap_searchoptINT80–48frames to look back for a token-aligned hot cut
max_windowsoptINT121–64
grid_growthoptBOOLEANtruegrow a hold-1 handle to land on the 17k+5 grid instead of letting the tail freeze absorb the remainder
plan_onlyoptBOOLEANfalse
s_per_stepoptFLOAT0.000–600
est_stepsoptINT181–100

Outputs (3)

NameTypeDescription
imagesIMAGE
audioAUDIO
reportSTRING