BMAB Face Detailer
Face-fixing with a segmentation mask option most detailers skip
- bind
- image
- lora
- BMAB bind
- image
Same core idea as every automated face-fixer in this space, ADetailer in A1111 and Impact Pack's FaceDetailer in ComfyUI included: a face that's small in the frame doesn't get enough latent budget to resolve properly, so you detect it, crop it out, redraw it at real resolution, and paste it back. BMAB's version of that loop lives here, and it comes with two options that matter more than they look like at first glance: which of six YOLO face models to detect with, and whether to refine the mask into a proper segmentation shape instead of a plain box.
The model and ordering choices
model gives you six options: two that ship with BMAB specifically (bmab_face_nm_yolov8n.pt, bmab_face_sm_yolov8n.pt) and four from the shared ecosystem family (face_yolov8n.pt, face_yolov8m.pt, face_yolov8n_v2.pt, face_yolov8s.pt) - the same weights ADetailer and Impact Pack draw from, so results should feel familiar if you've used either before.
limit (0-5, default 1) caps how many faces get detailed per run, and order decides which faces get picked when there are more detections than your limit: Size (biggest first), Left, Right, Center, or Score (detector confidence). If you've got a group shot and only want the person in the middle fixed, order = Center with limit = 1 gets you exactly that without touching a mask by hand.
sam_masking is the one worth understanding
sam_masking (off/on) switches the detection mask from a plain bounding box to a SAM-refined segmentation that follows the actual face outline. This is a real, known upgrade in the wider detailer ecosystem - a rectangular mask redraws a chunk of background along with the face, which is exactly what produces the visible seam and slight color shift people associate with automated face fixes. A mask that hugs the face outline instead of a box avoids redrawing background pixels at all, which is the single biggest lever for making a detail pass invisible rather than obviously "detailed." Turn it on if you're seeing seams; it costs a bit more compute for the segmentation step.
The rest of the pipeline inputs
steps, cfg_scale, sampler_name, scheduler mirror your main sampler (sampler/scheduler default to "Use same sampler"/"Use same scheduler," inheriting from the bind). denoise (default 0.4) sets redraw strength; padding and dilation control crop context and mask growth; width/height (default 512 each) set the resample resolution. Optional image and lora inputs follow the same pattern as BMAB's other detailers. Output is bind plus image - no annotation here, unlike the hand detailers, so there's no visual debug of what got detected.
Installing it
ComfyUI Manager: search comfyui_bmab, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/portu-sim/comfyui_bmab.git
cd comfyui_bmab
pip install -r requirements.txt
plus comfyui_controlnet_aux and ComfyUI_IPAdapter_plus, the two companion packs the README lists as required for comfyui_bmab as a whole.
Where people get burned
The classic mistake, straight from the wider ADetailer playbook: running this on a face that's already large and sharp in frame. A detail pass on an adequately-resolved face mostly just changes it slightly and drifts the style without improving anything - lower denoise or skip the node entirely for close-up shots. The other trap is leaving limit at 1 in a multi-person image and being surprised only one face got fixed; raise the limit, or lean on order to make sure the one face that does get picked is the right one.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| bind | BMAB bind | — | |
| steps | INT | 200–10000 | — |
| cfg_scale | FLOAT | 8.00–100 | — |
| sampler_name | COMBO | 45 options: Use same sampler, euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, +39 | |
| scheduler | COMBO | 10 options: Use same scheduler, simple, sgm_uniform, karras, exponential, ddim_uniform, +4 | |
| denoise | FLOAT | 0.400–1 | — |
| padding | INT | 328–128 | — |
| dilation | INT | 44–32 | — |
| width | INT | 512256–2048 | — |
| height | INT | 512256–2048 | — |
| model | COMBO | 6 options: bmab_face_nm_yolov8n.pt, bmab_face_sm_yolov8n.pt, face_yolov8n.pt, face_yolov8m.pt, face_yolov8n_v2.pt, face_yolov8s.pt | |
| limit | INT | 10–5 | — |
| order | COMBO | 5 options: Size, Left, Right, Center, Score | |
| sam_masking | COMBO | 2 options: off, on | |
| imageopt | IMAGE | — | |
| loraopt | BMAB lora | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| BMAB bind | BMAB bind | — |
| image | IMAGE | — |