中文

ComfyUI-H3-FaceRefine: a ComfyUI custom node set

A ComfyUI custom node set to refine and improve the quality of small faces in MiniMax H3 video.

Verified

Core facts

Read by a script from the official API, not rewritten by a model.

License
MIT
Languages
Python
Maintainer
Carasibana
Verified

What it is

ComfyUI-H3-FaceRefine is a ComfyUI custom node set to refine and improve the quality of small faces in MiniMax H3 video. The project says MiniMax H3 renders faces poorly when the head occupies a small fraction of the frame. The project is licensed under MIT.

Main features

  1. H3 Face Track + Crop detects the face on every frame, fills gaps where detection fails, and smooths the trajectory.

  2. H3 Load Video + Face Select loads a video and finds every face and every hard cut in one pass.

  3. H3 Face Stitch Back warps each refined crop back onto the exact float box it came from.

  4. H3 Face Mask (SAM) produces face-shaped paste masks instead of a rectangle, temporally smoothed.

  5. H3 Per-Frame Denoise varies denoise strength along the temporal axis via the latent's noise mask.

  6. In H3 Face Track + Crop, select takes largest_face, smallest_face, left_most, right_most, top_most, bottom_most, centre_most, closest_to_xy or detector_score.

Getting started

  1. After ComfyUI is restarted, the nodes appear under MiniMax H3/Face Refine.

  2. The Python packages ultralytics, scipy, insightface and scenedetect install automatically.

  3. The project includes two example workflows, both annotated in-graph.

  4. The H3 Face Refine Auto Select example workflow chooses the face to refine by a ranking rule, largest_face as shipped.

  5. In the H3 Face Refine Manual Select example workflow, the user chooses the face to refine, one per shot.

From the README · bash
git clone https://github.com/Carasibana/ComfyUI-H3-FaceRefine.git

Who it is for

The lipsync path in the example workflows depends on MiniMaxH3NativeAudioLock. MiniMaxH3NativeAudioLock is not redistributed here, so it has to be installed separately. H3 Face Mask (SAM) requires Impact Pack for SAMLoader.

If PySceneDetect is missing or fails to import, the run does not stop. When the environment variable H3_FACEREFINE_STRICT_PATHS is set to a non-empty value, only paths inside ComfyUI's own folder are read, and everything else is refused with a message saying so. In undetected_frames of H3 Face Stitch Back, fade_out ramps the composite to zero across the gap, skip hard-cuts to original pixels, and composite_anyway risks H3 hallucinating a face onto the back of a head.

In paste_region of H3 Face Stitch Back, full_crop pastes hair, shoulders and background too and risks a visible rectangle. In H3 Per-Frame Denoise, face_px_small is a face height in source pixels at or below which full denoise_multiplier_small_face applies. In H3 Per-Frame Denoise, face_px_large is a face height in source pixels at or above which denoise_multiplier_large_face applies.

Sources

This page is written from the official sources below. Open them to check the original text.

Verified ·

This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.