Jonathandinu Mask
The more accurate face-parsing mask that eats VRAM
- crop
- MASK
If BiSeNet Mask is the workhorse face-parsing mask, Jonathandinu Mask is the upgrade - and the pack's own README says so in so many words. The author shipped it in the same 2024-05 update and flagged it plainly: it's more accurate than BiSeNet, but it takes more memory; you can get out of memory more easily with it. So the pitch is simple: when BiSeNet's segmentation is blurring the line between lips and skin and you have VRAM to spare, this is the better tool.
Like its sibling, it takes a face crop plus a row of per-part booleans and outputs a single MASK that's the union of every enabled region. Same idea, different engine underneath: instead of the old BiSeNet CNN, it runs a Segformer semantic segmentation model (jonathandinu/face-parsing) from Hugging Face. Segformer is a transformer-based segmenter, which is exactly why it's both more accurate and hungrier - attention costs memory.
What's different in practice
- No manual model download. BiSeNet needs you to fetch
79999_iter.pthfrom a Google Drive link intomodels/bisenet. This node pulls its model automatically from Hugging Face the first time you run it, then caches it. If you've seen the pattern before: the first execution will stall while it downloads, then be normal forever after. - 18 classes instead of 19, with slightly different defaults -
eyeglasses,earring, andnecklacedefault to false here, where BiSeNet defaultseyeglassesandearringon. Glasses-wearing subjects are the classic place this bites; toggleeyeglasseson or the frames won't be masked. - GPU handling is slightly friendlier. The node picks cuda, then mps (Apple Silicon), then CPU for the model - though a chunk of its mask assembly still hardcodes CUDA, so don't count on it as a CPU escape hatch if you're fully GPU-less. And on modest cards, that OOM warning is real: a transformer segmenter plus your sampler on the same VRAM can tip you over.
When to reach for it
Same targeted-inpainting use case as BiSeNet Mask - mask just the mouth, just the eyes, or freeze everything but the region you want regenerated - but with cleaner region boundaries. If your mask edges are bleeding into neighboring features, swapping BiSeNet for jonathandinu in your CropFaces mask_type is a one-line experiment that often fixes it. If you're running out of memory, go the other way.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/dchatel/comfyui_facetools
or ComfyUI Manager → search facetools → restart. Needs the transformers package in your ComfyUI environment for the Segformer model - the pack ships no requirements file, so install it if you get a ModuleNotFoundError. No manual model files, just the first-run Hugging Face download.
One honest caveat for a node with zero search impressions: it's a niche tool for a specific workflow, and its only maintainer is the pack author. It does one thing well and it's worth knowing about - but it's not the node most people will build their pipeline around.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| crop | IMAGE | — | |
| skin | BOOLEAN | true | — |
| nose | BOOLEAN | true | — |
| eyeglasses | BOOLEAN | false | — |
| left_eye | BOOLEAN | true | — |
| right_eye | BOOLEAN | true | — |
| left_brow | BOOLEAN | true | — |
| right_brow | BOOLEAN | true | — |
| left_ear | BOOLEAN | true | — |
| right_ear | BOOLEAN | true | — |
| mouth | BOOLEAN | true | — |
| upper_lip | BOOLEAN | true | — |
| lower_lip | BOOLEAN | true | — |
| hair | BOOLEAN | false | — |
| hat | BOOLEAN | false | — |
| earring | BOOLEAN | false | — |
| necklace | BOOLEAN | false | — |
| neck | BOOLEAN | false | — |
| cloth | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |