Nodes/ComfyUI-MiniMax-H3-LongMedia/MiniMaxH3LatentLabProtectRefineAV
ComfyUI Node

MiniMaxH3LatentLabProtectRefineAV

The guard that stops your refine pass from wrecking the seam

By vizart-vj·Created 14 days ago·Updated 2 days ago· 71
MiniMaxH3LatentLabProtectRefineAV
  • base_av
  • refined_av
  • av
  • report
overlap_frames0

Every "second pass" in generative video has the same dirty secret: the refine step can improve detail while quietly destroying the things the first pass got exactly right - like the frozen continuation head that connects this segment to the previous one. ProtectRefineAV exists to stop exactly that. It takes your base latent (with its carefully preserved overlap) and your refined latent, and it restores the base's opening frames over the refined version so the seam survives the refine pass.

What it does

Three inputs, two outputs:

  • base_av - the pre-refine AV latent (the segment input with its frozen overlap head).
  • refined_av - the same latent after a refine pass sampled it.
  • overlap_frames (default 0) - how many frames from the base's opening get restored onto the refined result. Set 0 and it does nothing but validate.

Outputs: av - the protected result - and a report telling you how many video latent steps and audio latent steps were protected.

The mechanism is strict: it first errors if the refine pass changed the latent geometry (video or audio shape differs between base and refined), because a geometry shift means the refine isn't operating on the same timeline. Then it clones the refined latent and overwrites the first overlap_frames worth of video (and audio) with the base's values. The frozen head survives; the refine's improvements to the rest of the clip survive.

Why the audio detail matters

The report's fields make a subtle point: the audio is not restored from the main pass. The refine stage continues the same trajectory, so audio is refined too - only the exact frozen overlap is restored from base. That's deliberate: it keeps the low-noise stage faithful to the same schedule rather than snapping audio back to the noisy version. If you were expecting the base's whole audio stream to win, this node will surprise you - it protects the overlap head, not the entire audio track.

When you'd reach for it

This is one of the LongMedia-internal glue nodes - no friendly display name, no search-menu presence. It earns its keep inside the sampler's refine pipeline, where the final low-noise tail runs after the main pass and something has to defend the continuation seam. If you're hand-building that two-stage flow (Refine Sigmas splits your schedule into main + refine; this node reconciles the results), this is the reconciliation step.

Install

Ships in ComfyUI-MiniMax-H3-LongMedia. Manager search "MiniMax-H3-LongMedia", or:

cd ComfyUI/custom_nodes
git clone https://github.com/vizart-vj/ComfyUI-MiniMax-H3-LongMedia

restart, with the H3 checkpoint + VAEs available (MiniMaxAI/MiniMax-H3, ~42.5 GB, community license excludes US/EU/UK/Korea).

Troubleshooting

If it raises a geometry error, the refine pass genuinely changed the latent shape - that's a broken refine, not a false positive; find out what resized your latent. If the seam still shows after setting overlap_frames, make sure the value matches what the sampler used for continuation - a mismatch between the overlap you protect here and the overlap you generated with is the classic cause. And if you don't see this node doing anything at overlap_frames=0, that's correct behavior; it's a no-op until you tell it what to protect.

CategoryMiniMax H3/LongMedia/LongMedia

Inputs (3)

NameTypeDefaultDescription
base_avLATENT
refined_avLATENT
overlap_framesINT00–10000

Outputs (2)

NameTypeDescription
avLATENT
reportSTRING