MiniMax H3 Face Refine Window Plan / 局部修脸窗口规划 (Advanced)
Tell H3 exactly which frames are ugly — it plans the repair window
- base_frames
- window_plan
- repair_mask_preview
- window_count
- report_json
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-23or0-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;mergefolds 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(typeH3_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_countandreport_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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| base_frames | IMAGE | — | |
| fps | FLOAT | 24.000.01–240 | — |
| repair_ranges | STRING | 0-23 | 0-based inclusive pairs, for example 0-23,50-60. |
| range_mode | COMBO | frames_inclusive | 2 options: frames_inclusive, seconds_inclusive |
| context_before_frames | INT | 240–361 | — |
| context_after_frames | INT | 420–361 | — |
| min_render_frames | INT | 9022–362 | — |
| max_render_frames | INT | 36222–362 | — |
| scene_cut_threshold | FLOAT | 0.280.01–1 | — |
| overlap_policy | COMBO | reject | 2 options: reject, merge |
| short_shot_policy | COMBO | reject | 2 options: reject, edge_hold_exp |
| enabled | BOOLEAN | true | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| window_plan | H3_T8_FACE_REFINE_WINDOW_PLAN | — |
| repair_mask_preview | MASK | — |
| window_count | INT | — |
| report_json | STRING | — |