Nodes/comfyui-minimax-h3-audio-T8/MiniMax H3 Mask-Preserving Low-Sigma Refine Plan (v4 Advanced EXP/T8)
ComfyUI Node

MiniMax H3 Mask-Preserving Low-Sigma Refine Plan (v4 Advanced EXP/T8)

Mask-preserving low-sigma refinement for H3

By T8mars·Created about a month ago·Updated about 20 hours ago· 1,023
MiniMax H3 Mask-Preserving Low-Sigma Refine Plan (v4 Advanced EXP/T8)
    • plan
    • report_json
    model_name
    target_width1152
    target_height640
    temporal_chunk_frames136
    temporal_overlap_frames17
    anchor_strength0.999
    tile_width1152
    tile_height640
    spatial_overlap0
    spatial_fade0
    minimum_tile_size256
    overlap_blendsmoothstep
    precisionfp16
    release_policyoffload_after
    spatial_strategyfull_frame_safe
    temporal_strategyfull_clip_safe
    second_pass_audio_policyjoint_av_preserve_input
    video_mask_policyinherit_required

    The low-sigma two-pass plan already stops the "second half drifts" failure. v4 answers the question that route quietly leaves open: when you run a refine pass over the whole upscaled canvas, why is the model redrawing background it already got right? Every extra forward pass is a chance for the clean parts of your frame to pick up a new face, a wobbling wall, or slow background drift. This node - the v4 mask-preserving plan in the T8 pack - says: don't refine everywhere. Only refine where a mask tells it to.

    How the mask survives the trip

    The mechanism rides on MiniMax H3's nested video noise mask. The first-pass latent you feed in already carries a noise_mask (the same latent-space mask concept ComfyUI uses for inpainting: 0 = keep the original pixels exactly, 1 = let the model regenerate). v4's job is to carry that mask through the whole upscale-and-refine journey intact:

    • The learned 3D upscaler resizes only the mask's spatial grid (nearest-exact, no invented values).
    • The second pass multiplies that mask by both spatial and temporal ownership, so a 0 region is preserved pixel-for-pixel and only a 1 region is refined.
    • A static single-frame mask may expand across time; a dynamic time-varying mask whose latent length doesn't match is rejected outright rather than silently interpolated. No guessing.

    That last behavior is the philosophical core of this whole Advanced-EXP line: fail closed instead of quietly doing the wrong thing.

    It's also a plan node, matching its v2/v3 siblings: outputs a T8_H3_CHUNKED_TWO_PASS_PLAN (plan) plus report_json, feeding the existing MiniMax H3 Chunked Two-Pass Upscale executor. Everything old stays untouched - append-only, defaults in place.

    The two policy knobs

    Two inputs carry the new behavior. second_pass_audio_policy is inherited from v3: joint_av_preserve_input (default) keeps the exact first-pass audio as your deliverable while still letting the joint AV context condition the refine. video_mask_policy is the v4 addition:

    • inherit_required (default, recommended): the plan refuses a first-pass latent that has no noise mask. No mask, no run - it will not silently reopen and regenerate the whole background.
    • inherit_if_present_else_generate_all: if no mask exists, falls back to refining everything (the v3 behavior).
    • disabled: turn masking off entirely.

    Feeding it a mask

    A beginner mostly sets model_name (the learned 3D upscaler, minimax_h3_latent_upscaler_3d_fp16.safetensors in models/latent_upscale_models), target_width/target_height (multiples of 32), and provides the actual mask upstream - that's the real work. The mask has to align with the low-res first-pass canvas: black (0) means "keep this background," white (1) means "allow the person area to be generated," and grey only for soft edge transitions. This node does not segment people for you and won't fix drift that already happened in pass one.

    The author's own single real run (576×320 → 1152×640, 124 frames, 8+3 NFE) is encouraging: mean adjacent protected-background MAD fell 52% and mean drift from frame zero fell 70% versus the same masked-first-pass v3 route, with strict H.264/AAC decode passing. Read that as a validation datapoint, not a universal quality guarantee - the docs keep it Advanced EXP, full human review pending.

    Installing it

    Install: ComfyUI Manager search MiniMax H3 Audio T8, or git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8.git into custom_nodes and restart, with ComfyUI core itself updated first (the pack leans on the recent native H3 and weight-adapter APIs). Use the bundled dated workflow under 13-latent-upscale rather than hand-wiring this from memory - mask alignment is where everyone gets burned.

    CategoryT8/MiniMax H3/Upscale/Advanced

    Inputs (18)

    NameTypeDefaultDescription
    model_nameCOMBO1 options: minimax_h3_latent_upscaler_3d_fp16.safetensors
    target_widthINT115232–16384
    target_heightINT64032–16384
    temporal_chunk_framesINT13617–3600
    temporal_overlap_framesINT170–1700
    anchor_strengthFLOAT0.9990–1
    tile_widthINT115232–16384
    tile_heightINT64032–16384
    spatial_overlapINT00–4096
    spatial_fadeINT00–4096
    minimum_tile_sizeINT25632–4096
    overlap_blendCOMBOsmoothstep2 options: smoothstep, linear
    precisionCOMBOfp163 options: fp16, bf16, fp32
    release_policyCOMBOoffload_after3 options: offload_after, clear_after, keep_loaded
    spatial_strategyCOMBOfull_frame_safe2 options: full_frame_safe, independent_tiles_exp
    temporal_strategyCOMBOfull_clip_safe2 options: full_clip_safe, guarded_overlap_exp
    second_pass_audio_policyCOMBOjoint_av_preserve_input2 options: joint_av_preserve_input, locked_input_audio
    video_mask_policyCOMBOinherit_requiredRecommended: inherit_required. It refuses an unmasked input instead of silently reopening the full background.

    Outputs (2)

    NameTypeDescription
    planT8_H3_CHUNKED_TWO_PASS_PLAN
    report_jsonSTRING