MediaPipe FaceMesh Preprocessor Provider (SEGS)
Face-mesh control for per-region detailing
- SEGS_PREPROCESSOR
This node lets you drive a MediaPipe-FaceMesh ControlNet on each face Impact Pack detects, rather than on the whole image. It's a provider - it produces no image and has no effect on its own. You plug it into Impact Pack's ApplyControlNet (SEGS) node so that, during a detailer pass over detected face regions, each face gets a facial-landmark mesh extracted and fed to a face ControlNet.
Where this fits: Impact Pack's detailing loop finds a region, crops it, and resamples it at full resolution. For faces, a plain resample fixes resolution but can drift the expression, gaze, or head angle. A FaceMesh ControlNet pins the facial geometry - the eyes, mouth, and face contour stay put while the detailer sharpens everything. That's the job this provider enables inside SEGS.
How it works
MediaPipe FaceMesh detects a dense set of facial landmarks (the whole face contour, eyes, brows, lips, nose) and renders them as a mesh image. That mesh is the ControlNet hint: the redraw is constrained to the same facial structure. Because it's running inside the SEGS pipeline, it does this once per detected face, so a two-person shot gets two independent face meshes rather than one global pass.
The "Provider (SEGS)" wrapper is Inspire's contribution. SEGS is Impact Pack's per-detection data type (bbox + mask + crop). A preprocessor provider tells the SEGS ControlNet node which preprocessor to run on each region; this is the FaceMesh one. The underlying MediaPipe implementation comes from Fannovel16's ControlNet Auxiliary Preprocessors - Inspire adapts it to the SEGS flow.
The inputs and outputs that matter
Unlike most of the SEGS providers, this one exposes a few real knobs, because MediaPipe's detector needs tuning:
max_faces(default 10) - the maximum number of faces MediaPipe will try to find in a crop. The default is generous; there's rarely a reason to lower it.min_confidence(default 0.5) - the detection threshold. Drop it if faces are being missed (small, turned, or partly hidden); raise it if it's hallucinating faces in the background.resolution_upscale_by(default 1.0) - upscales the region before landmark detection. Bumping this can help MediaPipe lock onto small or distant faces at the cost of a little speed.
The single output is SEGS_PREPROCESSOR, which feeds the preprocessor input of Impact Pack's ApplyControlNet (SEGS). That node supplies the SEGS, the face ControlNet model, and the image; this provider is the "how to preprocess each face" half.
How to install it
ComfyUI Manager: search ComfyUI Inspire Pack, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
then restart. It's from Dr.Lt.Data, who also maintains ComfyUI-Manager and the Impact Pack this feeds.
You need two other packs for it to do anything: the Impact Pack (SEGS + ApplyControlNet (SEGS)) and ControlNet Auxiliary Preprocessors (the actual MediaPipe FaceMesh). The Inspire README also notes a version gotcha: older MediaPipeFaceMeshDetectorProvider builds aren't compatible with outdated ControlNet Aux - keep both packs current. You'll also want a MediaPipe-FaceMesh ControlNet downloaded for your base model.
Common issues & troubleshooting
Faces aren't being detected. Lower min_confidence and/or raise resolution_upscale_by so MediaPipe has more to work with. Small, profile, or occluded faces are the usual misses. Remember the SEGS detector that finds the region is separate - if your bbox detector never proposes the face, this provider never sees it.
MediaPipe / import errors on load. ControlNet Auxiliary Preprocessors isn't installed or is out of date. Install or update it via Manager and restart; the model downloads on first run.
The pass sharpens but the face changes anyway. The FaceMesh ControlNet strength is probably too low, or the wrong control model is loaded. This provider only supplies the mesh - the ControlNet does the constraining, so check that side.
Two faces, one mesh. Detection quality issue on the crop. If a segment contains two faces, raise max_faces and consider a tighter detector so each face is its own SEGS region.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| max_faces | INT | 101–50 | — |
| min_confidence | FLOAT | 0.500.01–1 | — |
| resolution_upscale_by | FLOAT | 1.00.5–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SEGS_PREPROCESSOR | SEGS_PREPROCESSOR | — |