Nodes/Herrgotts-H3-Infinite-Continuation-Suite/H3 Infinite - Auto Handover — Masked AV v1.4
ComfyUI Node

H3 Infinite - Auto Handover — Masked AV v1.4

Auto Handover v1.4 — The Freeze Detector That Decides the Whole Seam Now

By HerrgottMargott·Created 14 days ago·Updated 3 days ago· 51
H3 Infinite - Auto Handover — Masked AV v1.4
  • images
  • handover
  • analysis_info
  • freeze_detected
  • freeze_start_frame
  • ideal_handover_end_frame
  • phase_aligned_handover_end_frame
  • ignored_tail_frames
  • confidence
presetBalanced
analysis_window72
freeze_hold8
safety_margin3
context_frames39
analysis_size192
final_mean_diff_threshold0.0120
final_active_pixel_threshold0.025
max_final_active_area_percent3.00
transition_mean_diff_threshold0.0020
transition_active_pixel_threshold0.010
max_transition_active_area_percent1.00
min_static_transition_percent70
max_consecutive_motion_outliers2
final_reference_frames15
min_final_match_percent75
max_consecutive_final_outliers3
safety_modefixed

The v1.4 Auto Handover analyzer is the node that makes v1.4's entire philosophy work, and it's worth understanding even if you never touch a knob, because it's now the single source of truth for where every seam lands. Feed it the decoded full render of the accepted H3 clip, and it finds the safe continuation boundary: it detects the FL2VA freeze/unstable landing tail, excludes it, and then snaps that visual cutoff backward to the latest exact Masked-AV video boundary - the 39-frame (or larger) shared AV grid. Both Stitch Ready (the visible end of the previous clip) and the next clip's protected video head end at that same frame. One boundary, two uses, no mismatch. That's the whole upgrade from older versions, where the render cut and the continuation source could disagree.

The consequence you'll actually feel: the previous visible video and the next protected context now end at the same exact frame, so the stitched seam is internally consistent. And because the boundary is discrete, that final snap can move the handover up to ~16 rendered frames earlier than the detector's ideal visual cutoff. That's deliberate - the author live-tested recovering those grid-lost frames and got visible motion/alignment errors, so the release prioritizes a clean seam over squeezing back a few frames.

Inputs

  • images - decoded full rendered frames from the accepted clip.
  • preset - Balanced (default; validated detector with freeze_hold 8 and fixed 3-frame safety), Motion Safe (same detector, 6-frame safety), or Custom.
  • context_frames - fixed to "39" in v1.4, the minimum exact Masked-AV boundary. The tooltip is worth quoting: audio tail carryover is independent and does not change this video handover.
  • Custom-only advanced controls - analysis_window, freeze_hold, safety_margin, analysis_size, the primary/secondary thresholds, and the robust gates (min_final_match_percent, max_consecutive_final_outliers, etc.), plus safety_mode (fixed recommended; adaptive is legacy).

Outputs

handover (the metadata both Continue v1.4 and the stitcher consume), analysis_info (STRING), freeze_detected, freeze_start_frame, ideal_handover_end_frame, phase_aligned_handover_end_frame, ignored_tail_frames, and confidence. The three frame ints + confidence are the debug trio when a seam is off - and if ignored_tail_frames is huge, your clip had a long landing and the snap is doing exactly its job.

Install

From the Herrgotts-H3-Infinite-Continuation-Suite pack:

cd ComfyUI/custom_nodes
git clone https://github.com/HerrgottMargott/Herrgotts-H3-Infinite-Continuation-Suite.git

Restart ComfyUI, reload the UI. No pip deps, no bundled weights - H3 models/VAEs from Comfy-Org's MiniMax-H3 repo. And the v1.4 caveat applies: this node's metadata is consumed by the masked path, which needs a current ComfyUI with PR #15375 native H3 AV-mask support.

Gotchas

Feed it the render of the accepted clip, matching the latent you're about to save - if the analyzer's frame count disagrees with the saved latent's frame count, v1.4 Continue will refuse the handover rather than guess. And for dialogue, remember the video boundary here doesn't constrain audio: the Continue node's audio_tail_carryover can independently extend protection through the previous clip's full tail, so don't be confused when the analyzer's video cut and the audible audio seam don't line up. That's the feature.

CategoryHerrgotts H3 Infinite Continuation Suite

Inputs (19)

NameTypeDefaultDescription
imagesIMAGEDecoded FULL rendered frames from the accepted H3 clip.
presetCOMBOBalancedBalanced = validated detector with freeze_hold 8 and fixed 3-frame safety. Motion Safe = same detector with 6-frame safety. Custom reveals the advanced controls.
analysis_windowINT7212–480Custom only. Inspect this many final frames first. If the whole window is already locked, analysis automatically expands backward.
freeze_holdINT82–60Custom only. Minimum trailing lock length. Stable-tail consensus must persist for at least this many ending frames.
safety_marginINT30–12Custom only. Pixel-frame safety before the detected lock. With safety_mode=fixed (recommended), this configured margin is always respected; adaptive preserves the older confidence-based behavior.
context_framesCOMBO39v1.4 keeps the validated video geometry: the detector snaps its safe visual cutoff backward to the minimum exact 39-frame Masked-AV boundary. Audio tail carryover is independent and does not change this video handover.
analysis_sizeINT19264–512Custom only. Max edge used only for analysis. The rendered video is never resized or modified.
final_mean_diff_thresholdFLOAT0.01200.0001–0.03Custom only. PRIMARY lock test: maximum mean blurred RGB difference between a candidate frame and the median stable-tail reference. Lower = stricter/later lock.
final_active_pixel_thresholdFLOAT0.0250.001–0.2Custom only. PRIMARY lock test: per-pixel RGB-difference level used to decide which image areas differ from the median stable-tail reference.
max_final_active_area_percentFLOAT3.000.05–20Custom only. PRIMARY lock test: at most this percentage of the image may differ materially from the median stable-tail reference.
transition_mean_diff_thresholdFLOAT0.00200.0001–0.03Custom only. SECONDARY safety test: maximum mean luminance change between consecutive frames inside the detected final-frame lock.
transition_active_pixel_thresholdFLOAT0.0100.001–0.2Custom only. SECONDARY safety test: per-pixel luminance change that counts as residual motion.
max_transition_active_area_percentFLOAT1.000.05–20Custom only. SECONDARY safety test: maximum visibly changing area allowed for an individual transition.
min_static_transition_percentFLOAT7050–100Custom only. ROBUST secondary gate: minimum percentage of transitions inside the final-frame-matching suffix that must be near-static. Isolated shimmer/outliers are allowed.
max_consecutive_motion_outliersINT20–12Custom only. ROBUST secondary gate: maximum consecutive non-static transitions allowed inside an otherwise locked suffix. Prevents sustained real motion from being accepted.
final_reference_framesINT153–31Custom only. STABLE-TAIL reference: build the final-state image from the pixel-wise median of this many ending frames instead of trusting one possibly shimmering last frame.
min_final_match_percentFLOAT7550–100Custom only. ROBUST primary gate: minimum percentage of frames in the candidate locked suffix that must match the median final-state reference.
max_consecutive_final_outliersINT30–12Custom only. ROBUST primary gate: maximum consecutive final-state mismatches allowed inside the locked suffix. Candidate start itself must always match.
safety_modeCOMBOfixedCustom only. fixed is recommended; adaptive (Legacy) can reduce safety at high confidence.

Outputs (8)

NameTypeDescription
handoverH3_CONTINUOUS_HANDOVER
analysis_infoSTRING
freeze_detectedBOOLEAN
freeze_start_frameINT
ideal_handover_end_frameINT
phase_aligned_handover_end_frameINT
ignored_tail_framesINT
confidenceFLOAT