MediaPipe Nose Mesh
A nose-only mask — yes, this is a real use case
- image
- image
A nose-only mask sounds like a joke until you need one. Portraits that came out with a melted bridge, a shadow that looks like a bruise, a nostril that's structurally wrong - those are nose edits, and doing them with a hand-drawn mask on a tiny face region is miserable. This node isolates the nose automatically, on the cloud, in one call.
What it does
It's an imageMasking node in the Runware pack. Your image goes up, MediaPipe's face-mesh landmarks trace the nose, and you get back an image mask of just that region - a grayscale IMAGE tensor, black everywhere except the nose area. The model lives server-side, so there's nothing to download and no GPU requirement on your end.
The standard flow after that: run the mask through core ImageToMask if your sampler wants the MASK type, or feed it into a Runware inpaint node that accepts IMAGE masks. Pin the inpaint to the nose and the rest of the face stays bit-identical - the core promise of masked inpainting, and the reason this workflow survives the age of "just describe the fix" edit models. The KB's inpainting notes are worth a skim here: mask feathering and tight regions are precisely where people get hard seams or overreach.
Settings
Four widgets, same family, same meaning:
settings.confidence(default 0.5) - detection threshold. Noses are usually detected fine; raise it if you're getting stray blobs.settings.maskBlur(default 5) - edge feathering. The nose is small and high-detail; a lot of blur will soften the whole nose, so keep it low.settings.maskPadding(default 10) - extend/shrink. For a subtle reshape you'll often want to shrink into the nose so the inpaint doesn't chew on the cheeks.settings.maxDetections(default 6) - max faces in a batch.
ttl, ttl_value, and outputFormat are shared pack plumbing.
Install
Part of ComfyUI-Runware, installed once:
cd ComfyUI/custom_nodes
git clone https://github.com/Runware/ComfyUI-Runware
pip install -r ComfyUI-Runware/requirements.txt
Restart (or ComfyUI Manager → search "Runware"). You'll want a Runware API key from the dashboard: Settings → Runware API key, the RUNWARE_API_KEY env var, or runware auth login.
Gotchas
Every run is a paid cloud inference - the title bar prints the cost and a NSFW flag. And the recurring one: the mask comes back as an image, not a MASK socket, so convert before wiring into a standard sampler. If the mask feels too small for a full reshape, that's the node doing its job - compensate with maskPadding rather than reaching for the full face mesh.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| settings.confidenceopt | FLOAT | 0.500–1 | Confidence threshold for detections. Only detections above this score are included. |
| settings.maskBluropt | INT | 50–100 | Blur radius for mask edges, creating smooth transitions. |
| settings.maskPaddingopt | INT | 100–200 | Pixel amount to extend (positive) or shrink (negative) the mask area. |
| settings.maxDetectionsopt | INT | 61–20 | Maximum number of detections. Prioritizes highest confidence scores if exceeded. |
| ttlopt | BOOLEAN | false | Enable to set ttl. Off uses the model's default. |
| ttl_valueopt | INT | 60 | Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`. |
| outputFormatopt | COMBO | JPG | File format for the generated image. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |