ComfyUI Node

FastMaskDetailer

Detail everything inside your mask, not just faces

By mudknight·Created 8 months ago·Updated 2 months ago· 1
FastMaskDetailer
  • image
  • model
  • vae
  • positive
  • negative
  • mask
  • image
  • cropped_image
seed0
steps20
cfg1.5
samplereuler_ancestral_cfg_pp
scheduleralign_your_steps
denoise0.40
upscale_method
upscale_model
feather0.20
context_padding0.10

FastMaskDetailer is the mask-driven sibling of the pack's FastDetailer: instead of auto-detecting faces or objects with a bbox model, you give it a mask and it details everything inside that mask. Same crop → upscale → sample → downscale → uncrop loop, but you're in charge of the region. If FastDetailer is "fix the face," this is "fix whatever I drew around."

The detailer concept comes from the Impact Pack's FaceDetailer, which has been a fixture of every photorealistic face workflow since 2023 - detect the face, regenerate it at higher resolution so the sampler has more pixels of budget to fix distortion. The author's take ("FastDetailer") is the same idea tuned for speed: crop, upscale to ~1MP, sample, scale back down, and paste back. The explicit trade-off, stated in the docs, is detail and speed at the cost of cohesion with the rest of the image. MaskDetailer lets you point that power at any region - eyes, hands, a logo, a specific prop - by masking it instead of hoping a detector finds it.

How it works

Your mask becomes SEGS via Impact's MaskToSEGS, each connected region is cropped (with padding), upscaled to roughly a megapixel, sampled with the positive/negative conditioning and your sampler settings, downscaled back to the original crop size, and composited back onto the image. Two parameters shape the result:

  • context_padding (default 0.1) - percentage of context to include around the mask edge so the model has surroundings to work with. Too little and the sampler invents wild content at the boundary; too much and you're basically regenerating the whole image.
  • feather (default 0.2) - percentage of the region edge that gets feathered when compositing back, so the patch blends instead of showing a hard line.

The rest are the sampler controls: steps (20), cfg (1.5), sampler (euler_ancestral_cfg_pp), scheduler (align_your_steps), and denoise (0.4) - how much the masked region gets re-rolled. And upscale_method/upscale_model for the upscale stage.

Inputs and outputs

Required: image, model, vae, positive, negative, mask, seed, plus the sampler and upscale settings. No optional inputs. Outputs:

  • image - the final composited result.
  • cropped_image - the padded crops batched together. Mostly a debugging output, but handy to check that you masked what you think you masked.

Installing

Part of the mudknight utils pack, and this node needs the Impact Pack. ComfyUI Manager → install comfyui-mudknight-utils plus ComfyUI-Impact-Pack and ComfyUI-Impact-Subpack (the README lists both as required), or:

cd ComfyUI/custom_nodes
git clone https://github.com/mudknight/comfyui-mudknight-utils
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
git clone https://github.com/ltdrdata/ComfyUI-Impact-Subpack

Restart. No model files needed beyond your checkpoints and any upscale model you want to use.

Gotchas

  • "Node not found" errors - Impact Pack isn't installed (MaskToSEGS, SegsToCombinedMask come from it). That's the #1 failure.
  • Nothing happens - an empty or all-black mask produces no SEGS, and the node returns the original image silently. Draw a real mask.
  • Hard edges - raise feather; default 0.2 is conservative on small crops.
  • Sampler result wanders off - raise context_padding or lower denoise. At 0.4 denoise the region is being substantially rewritten, which is the point, but it needs context to stay on-model.

It's a niche node in a zero-impression pack, but if you've hit the wall where FaceDetailer's detector won't grab what you want fixed, a mask-driven detailer is the escape hatch - and this one is fast.

Categorydetailer

Inputs (16)

NameTypeDefaultDescription
imageIMAGE
modelMODEL
vaeVAE
positiveCONDITIONING
negativeCONDITIONING
maskMASK
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT1.50–100
samplerCOMBOeuler_ancestral_cfg_pp44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBOalign_your_steps10 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +4
denoiseFLOAT0.400–1
upscale_methodCOMBO5 options: lanczos, bilinear, bicubic, area, nearest-exact
upscale_modelCOMBO1 options: none
featherFLOAT0.200–1Percentage of image to feather when uncropping
context_paddingFLOAT0.100–1Percentage of image to use for context from edge

Outputs (2)

NameTypeDescription
imageIMAGE
cropped_imageIMAGE