Nodes/MiniMax-H3-Flow-Aligned-Regenerate/MiniMax H3 Partitioned Exact-Prefix Handoff [Legacy Controls]
ComfyUI Node

MiniMax H3 Partitioned Exact-Prefix Handoff [Legacy Controls]

Your H3 continuation's second chunk shouldn't cost target-grid prices

By xmarre·Created about a month ago·Updated about 18 hours ago· 21
MiniMax H3 Partitioned Exact-Prefix Handoff [Legacy Controls]
  • model
  • trajectory
  • learned_upscaler
  • metrics
  • video_vae
  • model
  • metrics
◄source_modescale►
◄source_scale0.70►
◄source_width864►
◄source_height640►
◄handoff_coordinate0.35►
◄handoff_selectionfixed►
◄guidance_modedirection+temporal►
◄direction_weight0.25►
◄acceleration_weight0.25►
◄consistency_weight0.25►
◄low_frequency_cutoff0.25►
◄temporal_weight0.20►
◄vdn_linear_diagnosticnormal►
◄audio_guided_overlap_ticks16►
◄audio_guided_overlap_modesampler_mask_exact_timestep►
◄prefix_transformer_contextexact_target_partitioned►
◄audio_position_domainsource_carrier►
◄audio_handoff_sourcemain_partitioned►
◄av_handoff_sourcemain_partitioned►
◄guidance_trajectory_sourcemain_exact_partitioned►
◄low_probe_execution_sourcemain_then_shadow►
◄frame_gauge_repairfalse►
◄frame_gauge_residual_modeoff►
◄provider_boundary_stabilizationsoft_support_v1►
◄capture_boundary_witnessfalse►
◄vdn_temporal_carrier_policynative_grid_then_map_v1►
◄handoff_transfer_controllearned_3d►
◄spatial_stage_controlprogressive_uniform_source►
◄softmax_diagnosticnormal►
◄video_guided_overlap_tokens6►
◄suffix_dc_bridgefalse►
◄target_band_tokens4►
◄target_band_handoff_staterenoise_clean►
◄target_band_contextmixed_grid►
◄uniform_source_detail_transportfalse►
◄source_prefix_projectionlatent_bicubic►
◄low_sampler_abafalse►
◄low_native_trace_step-1►
◄low_native_trace_pair_block-1►
◄low_native_trace_module_detailfalse►
◄low_native_trace_projection_detailfalse►
◄low_native_trace_qkv_detailfalse►
◄low_native_trace_token_admissionfalse►

The one-line version: this node lets a continued MiniMax H3 chunk spend its early denoising steps on a small video grid while the frames you already approved stay exactly as they were. Before it, those two things were in conflict, and the fallback was to sample the whole thing at full resolution.

Context if you're new to the model. MiniMax H3 is the 33B omni-modal video generator with jointly-produced stereo audio that landed on HuggingFace in August 2026, under a Community License that excludes the US, EU, UK and South Korea - so in those places the local weights aren't your problem, the hosted Hailuo API is. H3 does 4–15 seconds at up to 2K/24fps, which is where continuation enters: you generate in chunks, and every chunk after the first carries an exact prefix you don't want disturbed. MiniMax's closed H3-Regenerate-2K does the polished version of this; this pack is an independent reimplementation and says so.

The problem it exists to fix

Chunk one is cheap. MiniMax H3 Progressive Handoff (Target Input) runs its early steps on a smaller grid (70% linear ≈ half the area) and jumps to the target grid.

Chunk two isn't. The moment the denoise mask contains exact-zero values - a protected prefix - Target Input bails to its conservative fallback and forwards everything through one ordinary target-grid sampler lifetime: no low-grid work, no learned upscaler, full price per step. The design doc puts a number on it: a representative run had the second chunk taking the complete eight-step target-grid schedule. And the obvious fix is worse - resize that prefix down to the low grid and the transformer conditions on a spatially altered prefix during the early steps, which restoring the exact values at the end cannot undo.

How it works

The partition is the trick. Instead of one mixed packed latent pretending to be a uniform lattice, the low stage carries two explicitly described video domains: protected prefix frames at the target grid, and generated suffix frames at the lower source grid, each with its own coordinates and RoPE.

Attention then runs over one permitted K/V union - not per-partition kernels, because Sol's sparse routing threshold comes from the domain it's handed - with the prefix rows carrying an additive log-measure bias of log(source_rows_per_frame / target_rows_per_frame). That's the honest part: a prefix with more discrete rows per frame shouldn't get more attention mass just for being denser. VDN builds the union, Sol evaluates it in one SM120 call.

From there the shipped default spends one source-uniform low/probe pair and then target-high: three continuation sampler lifetimes, two history boundaries, no duplicate shadow lifetime. At the splice, a bounded one-token video DC continuity correction touches only the first generated suffix token, so your original exact values come back out byte-for-byte.

Audio stays on H3's native joint path with four sampler-owned audio latent ticks of overlap. H3's audio latent rate is 40 Hz, so that's about 100 ms, and sampler_mask_exact_timestep keeps H3's inner timestep labels on the authoritative exact mask. Four isn't arbitrary: on a previously-failing three-chunk continuation, the first decoded boundary improved from roughly +11.15 dB at 16 ticks to +0.21 dB at 4.

The fields you'll actually touch

model (your patched H3 model) and trajectory (an H3_FLOW_TRAJECTORY handle from MiniMax H3 Flow Trajectory - share one per execution).

learned_upscaler, which is required here rather than optional. There's no handoff_transfer dropdown: the code pins learned_3d. You need the H3_LATENT_UPSCALER provider from xmarre/Comfyui_Minimax_h3_latent_Upscaler-Plus, configured in the shipped example with minimax_h3_latent_upscaler_3d_bf16.safetensors, CUDA, bf16, offload_after_upscale=false.

source_scale=0.70 is a linear width/height scale, not area - at 0.70 the private grid is about 49% of the target area. Then handoff_coordinate=0.35 with handoff_selection=fixed, and guidance_mode=direction+temporal with direction_weight=0.25, temporal_weight=0.20, low_frequency_cutoff=0.25.

acceleration_weight and consistency_weight are staged: they do nothing in direction+temporal, activating only in direction+acceleration and downsample_consistency respectively. Don't tune values the runtime ignores. Everything from vdn_linear_diagnostic down is a comparison knob - the tooltips are the author's own, and each variant (main_then_shadow, source_carrier_uniform_shadow, …) runs extra work. Reach for them to bisect a problem, not to improve output.

Outputs are model, which you wire onward into your sampler or the next patcher, and metrics (H3_FLOW_METRICS) for MiniMax H3 Metrics JSON. Look for the partitioned_stage_plan event.

Installing it

Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/MiniMax-H3-Flow-Aligned-Regenerate.git

Restart. That's genuinely it - no requirements.txt, and the only declared dependency is numpy>=1.25. Companion imports are lazy, so ComfyUI boots clean without them.

Where people get burned

It's inert without the coordinated stack. You need the partitioned backends from xmarre/ComfyUI-Sol-H3 and xmarre/ComfyUI-VDN-H3-Plus, and they're imported when you queue, not at startup:

RuntimeError: partitioned exact-prefix continuation requires the matching
Sol-H3 and VDN-H3-Plus development branches

Check before blaming your graph:

python -c "import sol_h3.partitioned_request, vdn_h3.partitioned_runtime; print('ok')"

Mixed vintages fail on an ABI check - "Flow and VDN partitioned external-sequence APIs do not match". Flow v0.3.8 pairs with Sol-H3 v0.1.6, VDN-H3-Plus v1.5.6, Continuum v3.4.4 and Spectrum MiniMax H3 v0.2.28; that pin lives in the repo's RELEASE_CONTEXT.md, so read it before updating one piece.

You need a complete 1→0 schedule - the progressive path has to know the absolute flow origin, and partial low-sigma refinement tails are rejected. And raising the audio ticks is a trap: four is the fix for a defect that showed up at sixteen. For an honest A/B, 0 disables the overlap.

It fails closed. When geometry or backends don't qualify, preflight drops to the released exact target-grid path - slower than you hoped, not wrong.

CategoryMiniMax H3/flow regenerate

Inputs (48)

NameTypeDefaultDescription
modelMODEL—
trajectoryH3_FLOW_TRAJECTORY—
source_modeCOMBOscale2 options: pixels, scale
source_scaleFLOAT0.700.1–0.99—
source_widthINT86432–8192—
source_heightINT64032–8192—
handoff_coordinateFLOAT0.350.01–0.99—
handoff_selectionCOMBOfixed2 options: fixed, auto_compute
guidance_modeCOMBOdirection+temporal5 options: off, direction, direction+acceleration, direction+temporal, downsample_consistency
direction_weightFLOAT0.250–2—
acceleration_weightFLOAT0.250–1—
consistency_weightFLOAT0.250–2—
low_frequency_cutoffFLOAT0.250.02–1—
temporal_weightFLOAT0.200–1—
learned_upscalerH3_LATENT_UPSCALER—
vdn_linear_diagnosticCOMBOnormalnormal preserves the partitioned VDN learned linear complement; bypass_partitioned_linear suppresses the complete complement; suppress_cross_grid_temporal_taps keeps the complement active but zeros only temporal short-conv taps that cross the target/source grid boundary; raw_token_measure keeps both VDN paths active but disables only the matched target-prefix density correction in softmax and learned-linear measure policy.
audio_guided_overlap_ticksINT1640-Hz audio overlap width for sampler_mask or model_timestep_only. exact_mask keeps the carried audio prefix protected and uses zero overlap regardless of this width. Any non-negative integer is accepted. The applied width uses at most the available carried audio prefix.
audio_guided_overlap_modeCOMBOsampler_mask_exact_timestepexact_mask preserves the carried audio prefix with matching native sampler input, timestep and velocity masks. sampler_mask_exact_timestep is a compatibility alias for exact_mask. sampler_mask releases the configured overlap; model_timestep_only is an intentionally mismatched timestep diagnostic.
prefix_transformer_contextCOMBOexact_target_partitionedexact_target_partitioned preserves the production-shaped heterogeneous target-prefix/source-suffix transformer. source_carrier_uniform is a bounded diagnostic that leaves the low/probe transformer on its native uniform source grid while caller-owned exact output restoration remains unchanged.
audio_position_domainCOMBOsource_carriersource_carrier follows the low/probe video grid. On target-grid continuation its audio spatial positions equal target-grid positions. legacy_target remains available as the historical comparison domain.
audio_handoff_sourceCOMBOmain_partitionedmain_partitioned keeps the current low/probe audio state. source_carrier_uniform_shadow runs an isolated source-grid low-stage shadow lifetime and substitutes only its audio sampler state at the learned handoff; the main exact-partitioned video state and learned video transfer are retained.
av_handoff_sourceCOMBOmain_partitionedmain_partitioned preserves the #60/#61 handoff. source_carrier_uniform_shadow runs a separate uniform source-grid low+probe pair, selects its raw audio sampler state and clean generated video for the learned handoff, but keeps the main exact-partitioned captured Flow trajectory.
guidance_trajectory_sourceCOMBOmain_exact_partitionedmain_exact_partitioned preserves #62. source_carrier_uniform_shadow captures only the already-executed source-uniform shadow low+probe video trajectory into an isolated temporary store and uses that trajectory for target-high Flow guidance; handoff state, exact prefixes, and all audio controls stay #62.
low_probe_execution_sourceCOMBOmain_then_shadowmain_then_shadow keeps the selected exact-prefix low/probe path. Shadow lifetimes run only when a shadow handoff selector is explicitly enabled. source_carrier_uniform_only selects the alternative source-uniform low/probe path.
frame_gauge_repairBOOLEANfalseEnable paired-prefix handoff checks. A same-grid handoff resolves to identity. Heterogeneous registration remains subject to its runtime qualification.
frame_gauge_residual_modeCOMBOoffmeasure exports existing low/high stage tensors without changing sampling. Target-band runs also fit band/tail trajectories and export full video snapshots within a 256 MiB CPU budget. Accepted rigid transactions additionally record bounded regional residual geometry. CPU copies and file I/O add diagnostic overhead; off disables these exports.
provider_boundary_stabilizationCOMBOsoft_support_v1soft_support_v1 leaves sampler state unchanged and emits a bounded post-high boundary observation. Its historical pre-high correction is disabled. off disables this observation.
capture_boundary_witnessBOOLEANfalseCapture boundary evidence for this execution. Target-band and progressive_uniform_source continuation save scheduler-owned stage snapshots under output/h3_flow_regenerate/residual_geometry for Local Boundary Audit; other partitioned modes save VDN feature tensors under output/h3-flow-boundary-witness. Stage copies have a CPU byte budget and add copy and disk-write time. This is per-run and does not require an environment variable or ComfyUI restart.
vdn_temporal_carrier_policyCOMBOnative_grid_then_map_v1native_grid_then_map_v1 preserves the current VDN short-conv arithmetic. destination_grid_stencil_v1 supports exact-prefix and target-band continuation: cross-grid temporal taps map the raw projected feature to the receiving frame lattice before the checkpoint spatial stencil. Requires vdn_linear_diagnostic=normal and paired VDN capability; same-grid work is unchanged.
handoff_transfer_controlCOMBOlearned_3dlearned_3d preserves the current low->high learned latent handoff. bicubic_same_source_control replaces only that clean-video transfer operator with deterministic bicubic spatial resize while preserving the same source low/probe state, residual/noise transport, exact-prefix restoration, postprocess controls and target-high sampling. Diagnostic only.
spatial_stage_controlCOMBOprogressive_uniform_sourceprogressive_uniform_source (default) runs continuation low/probe as one full-duration reduced-grid clip for all generated frames, transfers the whole generated trajectory through the learned upscaler, then restores the exact target-grid prefix before high refinement. Use normal attention/VDN diagnostics and the default target-band selectors with this mode. progressive_uniform_source_exact_context is an unqualified candidate that additionally conditions low/probe on the unresampled target-grid prefix as a native video reference; Core places it before the target timeline and shifts target audio/video together; generated video still uses one native reduced-grid trajectory. same_grid_target_control runs continuation low/probe directly on the target grid, keeps the same handoff split and downstream high stage, and uses an identity clean-video transfer. All-generated first chunks retain progressive generation. progressive_low_to_high selects the configured reduced continuation grid. progressive_target_band keeps the first target_band_tokens generated tokens after the protected prefix on the target grid, keeps their native clean prediction and re-noises all generated tokens. It runs the remaining continuation tokens on the reduced grid with learned transfer. Modes other than progressive_uniform_source are retained for existing workflows and comparisons.
softmax_diagnosticCOMBOnormalnormal uses the selected attention backend for generated-suffix query groups. dense_suffix_same_domain forces only those same gathered suffix groups through the weighted dense path while preserving the identical Q/K/V domain, target-prefix bias, grouped ownership and VDN linear setting. target_query_sink_measure extends the target-grid query key bias over text/reference/audio rows in low/probe. Reduced-grid and global queries, gathered keys, linear measure policy and high-stage policy are preserved. Requires paired VDN support and, when selected, Sol support. Diagnostic only.
video_guided_overlap_tokensINT6Legacy video-overlap width in H3 temporal latent tokens. The value remains uncapped for workflow compatibility and provenance. Positive values do not feather or regenerate carried video tokens: target-high keeps the authoritative exact video prefix for every evaluation and reports requested_tokens with applied_tokens=0 and retired_prefix_release=true. Audio overlap is independent.
suffix_dc_bridgeBOOLEANfalseContinuation only. When enabled, the first generated token that receives learned spatial transfer gets the per-channel spatial-mean offset the transfer produced on the carried context. Disable to leave that token exactly as transferred. Same-grid continuation measures a zero offset either way.
target_band_tokensINT4Used only by spatial_stage_control=progressive_target_band: the number of generated H3 temporal latent tokens directly after the protected prefix that stay on the target grid through low/probe. It must leave at least one generated token on the reduced grid.
target_band_handoff_stateCOMBOrenoise_cleanUsed only by progressive_target_band. renoise_clean re-noises the band's clean prediction with the tail's independent handoff noise. carry_raw_band resumes the band from its actual low/probe sampler state at the handoff sigma; the protected prefix, tail and audio entry are unchanged. Experimental comparison control.
target_band_contextCOMBOmixed_gridUsed only by progressive_target_band. mixed_grid runs one transformer sequence containing target-grid prefix/band and reduced-grid tail. domain_uniform_v1 runs two uniform-grid hidden streams per model call: target prefix+band, and reduced projected prefix+band plus tail. The streams share no hidden state or conditioning rows. domain_uniform_all_stages_v1 also keeps the short head stream separate during high refinement, with both streams on the target grid. The learned band/tail handoff is unchanged. Experimental controls with additional compute; rendered tone continuity is unvalidated.
uniform_source_detail_transportBOOLEANfalseExperimental, off by default; used only by the progressive_uniform_source spatial-stage modes. Adds the last prefix frame's exact-minus-learned residual to the suffix before high refinement, weighted by learned change and prefix residual persistence. Prefix calibration does not establish suffix motion safety: detail lost by projection can move without the gate detecting it, causing stale detail or an overlay. Rendered quality is unvalidated. Keep off when testing exact visual context alone.
source_prefix_projectionCOMBOlatent_bicubicSource-prefix construction for progressive_uniform_source modes. vae_rgb_roundtrip decodes the carried target prefix, resizes RGB and encodes it once before low sampling. Connect the generation's native video_vae. Experimental continuation input; final target prefix remains exact. Adds one VAE decode and one encode per continuation chunk. native_source_carry instead uses the preceding chunk's source clean prediction, paired by the exact returned target-prefix hash; run the full sequence with the same patched MODEL. No VAE is needed for carry; missing or changed context stops before sampling. native_source_carry_target_band additionally takes the carry's low latent band from the resized returned target prefix (experimental).
low_sampler_abaBOOLEANfalseRetired compatibility field. Saved values remain loadable; live replay and kernel observation no longer execute. Saved diagnostic bundles remain readable.
low_native_trace_stepINT-1-1–511Retired compatibility field. Saved values remain loadable; live replay and kernel observation no longer execute. Saved diagnostic bundles remain readable.
low_native_trace_pair_blockINT-1-1–511Retired compatibility field. Saved values remain loadable; live replay and kernel observation no longer execute. Saved diagnostic bundles remain readable.
low_native_trace_module_detailBOOLEANfalseRetired compatibility field. Saved values remain loadable; live replay and kernel observation no longer execute. Saved diagnostic bundles remain readable.
low_native_trace_projection_detailBOOLEANfalseRetired compatibility field. Saved values remain loadable; live replay and kernel observation no longer execute. Saved diagnostic bundles remain readable.
low_native_trace_qkv_detailBOOLEANfalseRetired compatibility field. Saved values remain loadable; live replay and kernel observation no longer execute. Saved diagnostic bundles remain readable.
low_native_trace_token_admissionBOOLEANfalseRetired compatibility field. Saved values remain loadable; live replay and kernel observation no longer execute. Saved diagnostic bundles remain readable.
metricsoptH3_FLOW_METRICS—
video_vaeoptVAE—

Outputs (2)

NameTypeDescription
modelMODEL—
metricsH3_FLOW_METRICS—