Nodes/comfyui-minimax-h3-audio-T8/MiniMax H3 Face Refine Window Plan / 局部修脸窗口规划 (Advanced)
ComfyUI Node

MiniMax H3 Face Refine Window Plan / 局部修脸窗口规划 (Advanced)

Tell H3 exactly which frames are ugly — it plans the repair window

By T8mars·Created about a month ago·Updated a day ago· 1,031
MiniMax H3 Face Refine Window Plan / 局部修脸窗口规划 (Advanced)
  • base_frames
  • window_plan
  • repair_mask_preview
  • window_count
  • report_json
fps24.00
repair_ranges0-23
range_modeframes_inclusive
context_before_frames24
context_after_frames42
min_render_frames90
max_render_frames362
scene_cut_threshold0.28
overlap_policyreject
short_shot_policyreject
enabledtrue

The standard way to fix a melt in a video is brutal: regenerate the whole clip and hope the new version doesn't break somewhere else. That's throwing away a lot of good frames to fix a few bad ones. T8mars' Face Refine Window route is the surgical alternative - you say "frames 0 through 23 have a bad face," and only that stretch gets re-rendered as an H3 window, with the model auto-supplied enough surrounding context to stay consistent. MiniMaxH3FaceRefineWindowPlanT8Advanced is the node where you point at the damage.

What it does

You feed it your full source timeline and a list of 0-based, inclusive frame ranges - the README example is 0-23 for a 24-frame bad run - and it produces a window plan: one or more contiguous windows H3 can actually render, each wrapped in enough context frames that the regenerated part has continuity to match against.

Two constraints shape everything. First, H3 doesn't accept arbitrary window lengths - a legal window is 17n+5 frames (90, 107, 124, ... 362). The planner rounds your repair range up to the next legal length inside the min_render_frames/max_render_frames bounds you set (defaults 90 and 362). Second, the extra context is exactly that - context. It helps the model generate, but it is never allowed back into the final result. Same for edge padding. The philosophy threaded through this whole route: context informs, only your explicitly-selected repair frames can ever land in the output.

The inputs that matter

Most are set-and-forget if you're on 24fps source, so here's the short list:

  • repair_ranges - the one you'll actually edit. 0-23 or 0-23,50-60, inclusive pairs.
  • context_before_frames / context_after_frames - how much lead-in and lead-out context H3 gets (defaults 24/42). Give the model room to establish the face before the repair starts.
  • scene_cut_threshold - the planner detects hard cuts and rejects any repair range that crosses one, because a window that spans a cut can't hold consistent context. Split the range instead.
  • overlap_policy - reject (default) errors if your ranges overlap; merge folds them together.
  • enabled - off makes this an exact no-op that passes through, handy when you're building the graph before committing.

The min/max render frames, short_shot_policy (edge_hold_exp lets a too-short window hold the boundary frame as context), and range_mode (frames vs seconds) are the ones you reach for when the defaults reject something you actually want.

Outputs

  • window_plan (type H3_T8_FACE_REFINE_WINDOW_PLAN) - the payload everything downstream consumes. It's hash-signed, so don't hand-tweak it.
  • repair_mask_preview - a MASK you can view to confirm the planned repair region before you spend GPU time.
  • window_count and report_json - how many windows resulted, and why.

Wire the plan into MiniMaxH3FaceRefineWindowExtractT8Advanced (single-window path) or MiniMaxH3FaceRefineWindowStudioStartT8Advanced (multi-window serial path). The example graphs are in examples/workflows/06-face-refine - three 2026-09-05 workflows: Window_Manual_Review, Window_Studio_Serial, Window_Studio_Compose.

Install and expectations

Same as every node in this pack: ComfyUI Manager (search "MiniMax H3 Audio T8") or git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8 into custom_nodes, restart. No extra pip deps for these nodes, and this planner itself never loads a model - it's pure timeline math on your base_frames, so it's free to experiment with. The real cost shows up later in the H3 window render. Note this whole route is marked Advanced EXP in the pack: it passed a fixed 16GB test matrix and one real bad-face sample, but multi-subject blind tests are still running. Preview before you accept, and don't batch-accept automatically.

CategoryT8/MiniMax H3/Quality/Experimental/Face Refine Window

Inputs (12)

NameTypeDefaultDescription
base_framesIMAGE
fpsFLOAT24.000.01–240
repair_rangesSTRING0-230-based inclusive pairs, for example 0-23,50-60.
range_modeCOMBOframes_inclusive2 options: frames_inclusive, seconds_inclusive
context_before_framesINT240–361
context_after_framesINT420–361
min_render_framesINT9022–362
max_render_framesINT36222–362
scene_cut_thresholdFLOAT0.280.01–1
overlap_policyCOMBOreject2 options: reject, merge
short_shot_policyCOMBOreject2 options: reject, edge_hold_exp
enabledBOOLEANtrue

Outputs (4)

NameTypeDescription
window_planH3_T8_FACE_REFINE_WINDOW_PLAN
repair_mask_previewMASK
window_countINT
report_jsonSTRING