H3 Prefix Freeze Mask (alpha)
Give the carried prefix a freeze mask so pass 2 doesn't re-texture the seam
- mask
- report
The companion to H3 ProtectPrefix, and the one that actually fixes a measured defect. When you carry a clip's prefix into a continuation, pass 2 should preserve it - but the pack measured that hold-1 alone wasn't enough: pass 2 re-textured the seam it was supposed to preserve (handle MAE 20/255 with hold-1 only, measured 2026-08-23). H3 PrefixFreezeMask builds the time-varying freeze mask that tells H3 V2V Init to keep the prefix exactly and regenerate everything after it.
How it works
It produces a MASK shaped for H3 V2V Init's mask input with time_varying on. The mask is 0 over the carried prefix frames - keep the init, no re-denoise - and 1 everywhere after, regenerate. Paired with H3 ProtectPrefix forcing hold 1 over the prefix (so the de-rope can't retime the anchor), the prefix occupies the first HANDLE frames of the dilated clip exactly, and 39 frames is token-exact on the 17k+5 grid. In other words: the two nodes split the problem the way the pack frames it - ProtectPrefix guards the clock, this node guards the pixels.
Inputs, both required:
plan- the continuation plan that knows the prefix geometry.dilated_length- H3 Time Smear'slengthoutput: the length of the dilated clip the mask rides on. This matters because the mask lives in dilated coordinates, not world coordinates.
Outputs: mask (the MASK wire for H3 V2V Init) and a report.
Why a freeze mask and not something cleverer
The pack tried other routes for preserving continuity across a join, and the honest reading of the docs is that a hard, well-placed freeze is the one that holds: the prefix is supposed to be identical to what came before, so the correct instruction to the model is "don't touch this." Making it a time-varying mask (vs. a static one) is what lets V2V Init freeze only the prefix region and regenerate the rest, rather than freezing the whole frame's first half of the clip.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/matlowai/ComfyUI-MAINodes
or ComfyUI Manager → ComfyUI-MAINodes, restart. Category MAINodes/alpha.
Common gotchas
The mask is only correct if dilated_length matches what H3 Time Smear actually emitted - wire it from the node's length output rather than typing a guess, since the dilated length is a function of your hold map and can surprise you. And time_varying on H3 V2V Init is a separate checkbox you still have to set; this node emits the mask, it doesn't flip the flag. If the seam still drifts, check that ProtectPrefix is in the map path too - freeze alone doesn't stop the de-rope from retiming the prefix.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| plan | STRING | — | |
| dilated_length | INT | 00–36000 | H3 Time Smear's length output: the dilated clip the mask rides on |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |
| report | STRING | — |