H3 Studio · Face Refine (Distant & Wide)
Fixing the tiny, distant faces H3 leaves behind
- image
- h3_bundle
- model
- vae
- clip
- image
- status
H3 can absolutely nail a wide composition - a full scene, a crowd, a character in a big frame - and then leave the face at 60×60 pixels looking like it was rendered by a slightly angry potato. That's not a prompt problem; it's what happens when a face gets a tiny slice of the model's attention. If you've used ADetailer in A1111 or Impact Pack's FaceDetailer in ComfyUI, you know the fix: detect the face, crop it, rerender it at proper resolution, paste it back. H3StudioFaceRefine is that loop, done through H3 itself rather than a generic ESRGAN pass.
The mechanism is what makes it worth understanding. After your final still is selected, the node detects eligible faces, crops the real source region, rerenders that crop through H3's native FL2VA image-conditioning path, and blends the result back into the still. The README is explicit: "It is not a generic sharpening or ESRGAN pass." Each refined face is another full H3 diffusion pass, which is why the settings emphasize restraint.
The modes and knobs
- mode -
Off(leave the still untouched),Auto(conservative; refines at most one eligible face per output), orStrong(multi-face refinement viamax_faces, default 4). - guide_size - the refine canvas: 512, 768 (recommended default) or 1024 px. Bigger crops give the face more room but cost a lot more time and memory.
- denoise (0.22) and crop_factor (2.5) - how strongly the rerender regenerates and how much context each crop keeps around the face.
- blend_feather (16) and color_match (on) - how the refined crop composites back in.
- mask_mode -
Feathered(default, detector-anchored) orSAM if available, which uses Impact Pack + amodels/sams/checkpoint for a tighter mask. If SAM's missing it falls back to feathering safely - nice. - adaptive_denoise (on) - adjusts per-face denoise instead of hammering every crop with the same value.
The detection chain
The node prefers YOLOv8-Face (face_yolov8m.pt) through ComfyUI-Impact-Subpack, then a local Ultralytics loader, then MediaPipe if installed, and finally a bundled OpenCV Haar fallback. So the dependencies are optional but recommended - grab the YOLO model via the separate Face Refine setup action or from the Bingsu/adetailer repo and put it in models/ultralytics/bbox/. Acceleration is also opportunistic: if the LightX v1.0 four-step FL2VA adapter is installed it uses it; otherwise it reuses another compatible LightX profile or falls back to Base Balanced rather than failing.
Outputs and gotchas
Outputs are image (the refined still) and status (a report including detector, selected and refined counts). Failed face crops preserve the original pixels unchanged, so a botched crop won't ruin your image. Optional h3_bundle, model, vae, clip and prompt inputs exist if it can't find what it needs downstream - usually you can leave them unconnected and let it pull from the graph.
The honest cost warning: every extra face and every step up in guide size multiplies runtime and VRAM quickly. Auto is the right default; reserve Strong for when you actually have several small faces that matter.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/thaakeno/ComfyUI-MiniMax-H3-Studio.git
cd ComfyUI-MiniMax-H3-Studio
python -m pip install -r requirements.txt
Restart, hard-refresh, then set up the detector (Impact-Subpack or the Ultralytics model file) for the real experience - without it, the Haar fallback works but is clearly worse. This is an alpha feature in an alpha pack, so test it on a single face before you trust it on a crowd.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mode | COMBO | Auto | 3 options: Off, Auto, Strong |
| crop_factor | FLOAT | 2.51.2–5 | — |
| guide_size | COMBO | 768 | 3 options: 512, 768, 1024 |
| denoise | FLOAT | 0.220.05–0.8 | — |
| blend_feather | INT | 162–64 | — |
| max_faces | INT | 41–16 | — |
| color_match | BOOLEAN | true | — |
| mask_mode | COMBO | Feathered | 2 options: Feathered, SAM if available |
| adaptive_denoise | BOOLEAN | true | — |
| h3_bundleopt | H3_STUDIO_BUNDLE | — | |
| modelopt | MODEL | — | |
| vaeopt | VAE | — | |
| clipopt | CLIP | — | |
| promptopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| status | STRING | — |