MiniMax H3 Face Refine Stitch Audit / 脸部回贴审计 (Advanced)
Paste the refined face back — with a bit-exact audit of what you touched
- base_frames
- refined_crops
- face_plan
- candidate_frames
- changed_mask
- fallback_mask
- fallback_count
- report_json
This is the end of the face-refine pipeline: the node that takes your refined face crops and pastes them back onto the original frames. And because this pack is pathologically honest about not wrecking your source, it's not a dumb paste - it's a review candidate with source-bound geometry, local color matching, per-frame fallback, and a bit-exact audit of every pixel outside the mask.
Here's the mechanism. It stitches the refined crops into base_frames using a mask derived from the plan - paste_region defaults to ellipse, a soft face-shaped region rather than a hard rectangle. The blend is feathered (feather_source_px, 12px default), locally color-matched to the source (color_match_strength, 0.65), and scaled by blend_strength (1 = full paste). Then the guardrail: if a frame's normalized RGB change in the face region exceeds max_face_mean_abs_delta (default 0.4), that frame falls back to the original source instead of showing you a mutant face. fallback_neighbor_frames (1) extends the fallback to neighbors so you don't get a single flickering bad frame. And processing_device defaults to cpu_memory_safe - this is a CPU-safe operation by design.
What it will never do: overwrite or auto-accept the source, or modify audio. The output is a candidate for you to review, not a finished edit. On the honesty front, the outside-mask pixels are audited bit-exact - the node can tell you the stitch didn't touch anything it shouldn't have.
Inputs: base_frames (original frames), refined_crops (the second-pass outputs), face_plan (the H3_T8_FACE_REFINE_PLAN from planning, which defines the geometry).
Outputs: candidate_frames (your review copy), changed_mask (exactly where it actually changed), fallback_mask and fallback_count (which frames bailed back to source and how many), and report_json. It's an output node, so it terminates a branch - the natural next step is you looking at the frames.
Where people trip: they expect the stitch to be the final deliverable. It isn't - it's a review candidate, and if you want an automated regression check before export, that's what the Face Refine Quality Gate node in the parity family is for. Run the stitch, look at the candidate, and only then decide. The "didn't touch the source" guarantee is the whole point.
Install: ComfyUI Manager → "MiniMax H3 Audio T8", or:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8
Restart after. No forced pip deps, no weight downloads. The H3 model/CLIP/VAE you already have for the refine pass are all that's involved here - stitching is pure CPU image work.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| base_frames | IMAGE | — | |
| refined_crops | IMAGE | — | |
| face_plan | H3_T8_FACE_REFINE_PLAN | — | |
| paste_region | COMBO | ellipse | 3 options: ellipse, rectangle, full_crop_exp |
| feather_source_px | FLOAT | 12.00.5–256 | — |
| blend_strength | FLOAT | 1.000–1 | — |
| color_match_strength | FLOAT | 0.650–1 | — |
| max_face_mean_abs_delta | FLOAT | 0.400.01–1 | Frames above this normalized RGB change fall back to the source. |
| fallback_neighbor_frames | INT | 10–12 | — |
| processing_device | COMBO | cpu_memory_safe | 2 options: cpu_memory_safe, cuda_if_available |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| candidate_frames | IMAGE | — |
| changed_mask | MASK | — |
| fallback_mask | MASK | — |
| fallback_count | INT | — |
| report_json | STRING | — |