Nodes/ComfyUI-MAINodes/H3 Segment Crop (regen only the window) [alpha]
ComfyUI Node

H3 Segment Crop (regen only the window) [alpha]

Stop regenerating the frames that were already fine

By matlowai·Created 17 days ago·Updated about 16 hours ago· 112
H3 Segment Crop (regen only the window) [alpha]
  • images
  • images
  • hold_map
  • splice_map
  • first_frame
  • last_frame
  • report
hold_map
handle_frames12
grid_alignfalse

H3 Segment Crop is the cost lever for targeted de-roping, and it answers the most annoying question in the MAINodes pipeline: why am I paying to regenerate a whole clip when only two seconds of it smeared? The de-rope pipeline reads a hold map and re-renders everything that map touches - but if the problem is one burst in a longer clip, the smart move is to regenerate only that window. This node figures out where the window is, cuts the clip to it, and hands you everything you need to run the regen chain on the small piece instead of the whole world.

How it works

Give it the baseline frames (images, world clock) and a hold_map (from the jerk oracle, H3 Manual Hold Map, or H3 Motion Editor), plus handle_frames (default 12) - the real-time context frames kept on each side of the held span. It then:

  • crops the clip to the held span plus handles,
  • emits a segment hold_map - the cropped map, which you wire into H3 Time Smear in place of the full-clip map,
  • emits a splice_map - in world coordinates, for H3 Segment Splice to reassemble,
  • gives you first_frame and last_frame - the handle endpoints, which you can wire into the regeneration's conditioning to pin the seam poses on FL2VA checkpoints (the README recommends this; it anchors the seam).
  • returns a report stating the exact speedup ratio for your selection.

The handles are generated at hold 1 and injected at your inject value, so they come back close to the baseline - and that's deliberate: Segment Splice crossfades inside them, so the seam hides the residual tone drift. Multiple separate bursts are covered by one window spanning first-to-last held frame in this version; it doesn't split bursts into separate windows.

Why the cost math matters

Cost scales with dilated token count, not clip length. A one-burst window in a long clip regenerates several times faster than the whole world, and the report prices it before you pay. This is the same reasoning as the pack's window mode, but as a single crop/reassemble pair rather than a rolling driver - it's the manual, human-in-the-loop version, and it's the one you'll probably reach for first.

Install

It's part of matlowai/ComfyUI-MAINodes:

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

Restart, and it's under image/minimax/motion. No extra Python dependencies; you need MiniMax-H3 weights and ComfyUI's H3 support (mind the licence's US/EU/UK/Korea carve-out before you commit to the stack). The example graphs additionally expect ComfyUI-KJNodes.

One gotcha worth knowing before you queue: the grid_align toggle (alpha, default off) exists because H3 Time Smear reaches the 17k+5 grid by extending the last hold - which can park a multi-frame freeze on the window's final frame, and a frozen tail is exactly where H3 invents extra beats. Leaving grid_align off reproduces earlier results bit-identically, so don't flip it mid-comparison. If your seam output invents beats at the tail, that's the knob to reach for.

Categoryimage/minimax/motion

Inputs (4)

NameTypeDefaultDescription
imagesIMAGEbaseline frames, world clock
hold_mapSTRINGfrom the oracle, H3 Manual Hold Map, or H3 Motion Editor
handle_framesINT122–48real-time context frames kept on each side of the held span
grid_alignoptBOOLEANfalse(alpha, OFF = shipped behaviour, bit-identical) H3 Time Smear reaches the 17k+5 grid by extending the LAST hold, which parks a multi-frame freeze on the window's final frame (measured: hold 8, a third of a second frozen) and a frozen tail is where H3 invents extra beats. Handle frames cost exactly 1 smeared frame each, so turning this ON grows a hold-1 handle by the deficit instead and the sum lands on the grid exactly, no freeze. Changes the crop bounds, so it changes the render: leave it off to reproduce an earlier result.

Outputs (6)

NameTypeDescription
imagesIMAGE
hold_mapSTRING
splice_mapSTRING
first_frameIMAGE
last_frameIMAGE
reportSTRING