Nodes/ComfyUI Easy Use/preMaskDetailerFix
ComfyUI Node Runs on cloud

preMaskDetailerFix

Impact Pack's detailer knobs, wrapped in an EasyUse pipe

By yolain·Created 3 years ago·Updated 7 days ago· 2,774
preMaskDetailerFix
  • pipe
  • mask
  • optional_image
  • pipe
◄guide_size384►
◄guide_size_fortrue►
◄max_size1024►
◄mask_modetrue►
◄seed0►
◄steps20►
◄cfg8.00►
◄sampler_name▾►
◄scheduler▾►
◄denoise0.50►
◄feather5►
◄crop_factor3.0►
◄drop_size10►
◄refiner_ratio0.20►
◄batch_size1►
◄cycle1►
◄inpaint_modelfalse►
◄noise_mask_feather20►

If you've ever used Impact Pack's FaceDetailer, you already know what this node does - the parameter names are lifted almost 1:1. easy preMaskDetailerFix is Easy-Use's own version of the detect-crop-resample-paste-back pattern that made automatic detail fixing standard ComfyUI practice, except it doesn't do any detecting itself. You hand it a mask (from wherever - a segmentor, a manual paint, an SAM box), and it configures a resampling pass over that masked region for a paired execution node to actually run.

The "pre" pattern

This is the half of the Easy-Use split that everyone new to the pack trips over once: pre nodes don't sample anything. They bundle your settings - sampler, steps, cfg, crop geometry - into the pipe object and hand it downstream. The node that actually crops, upscales, resamples, and composites is a separate one (the README calls out easy DetailerFix as its execution-side partner). If you wire this node up and nothing changes in your image, you're missing that second node - this one alone is just configuration.

The mechanism, once wired correctly, is the same as Impact Pack's: crop a padded box around your mask, upscale that crop to a real working resolution, run a fresh sampling pass on it, then feather and composite it back into the full image. It's why detail passes work at all - an eye occupying 60 pixels of a 1024px frame gets almost no model attention at native res; crop it out and it can get 384 or more.

The inputs that actually matter

Most of the required list is standard sampling (seed, steps, cfg, sampler_name, scheduler, denoise) - keep denoise around 0.5, this is a fix pass, not a regeneration. The geometry-specific ones are the point of the node:

  • guide_size (384) - the resolution the cropped patch gets upscaled to before sampling. This is where your detail actually comes from.
  • max_size (1024) - a ceiling on that upscale, so a huge mask doesn't try to render at absurd resolution.
  • crop_factor (3) - how much padding around the mask to include. Too tight and you get visible seams; too loose and you burn your guide_size budget on background instead of the subject.
  • feather (5) and the optional noise_mask_feather - edge softening for the output composite and for the noise mask used during sampling, respectively. Two different feathers, two different jobs.
  • drop_size - ignores stray mask fragments smaller than this, useful when your mask source is noisy.
  • cycle - re-runs the detail pass this many times. Diminishing returns fast; 1 or 2 is normal.
  • refiner_ratio - if the pipe carries a refiner model, how much of the step budget hands off to it.

Optionally, optional_image overrides the image carried in the pipe (handy if you're detailing something you loaded separately from your main generation), and inpaint_model switches the encode step to inpaint-conditioning semantics if your checkpoint is an actual inpainting model rather than a general one.

The single output is pipe - carry it straight into easy DetailerFix to get an image back.

Installing it

ComfyUI Manager: search ComfyUI Easy Use, install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Use

On Windows, double-click install.bat in the new folder to grab the pack's dependencies; on Linux/Mac there's no script, so cd into the folder and run pip install -r requirements.txt yourself. Restart ComfyUI.

Where people get stuck

The most common complaint is "I set everything and nothing happened" - that's the missing paired execution node, not a bug. Second most common: a blank or all-zero mask silently produces no visible change, which usually means whatever fed mask (a segmentor, a SAM node) didn't actually detect anything - check that upstream output before assuming this node is broken. And if the detailed region looks stylistically off from the rest of the image, that's the classic inpainting failure mode: denoise is too high for a "fix," or crop_factor didn't give the model enough surrounding context to match.

CategoryEasyUse/Fix

Inputs (21)

NameTypeDefaultDescription
pipePIPE_LINE—
maskMASK—
guide_sizeFLOAT38464–16384—
guide_size_forBOOLEANtrue—
max_sizeFLOAT102464–16384—
mask_modeBOOLEANtrue—
seedINT00–18446744073709550000—
stepsINT201–10000—
cfgFLOAT8.000–100—
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT0.500.0001–1—
featherINT50–100—
crop_factorFLOAT3.01–10—
drop_sizeINT101–16384—
refiner_ratioFLOAT0.200–1—
batch_sizeINT11–100—
cycleINT11–10—
optional_imageoptIMAGE—
inpaint_modeloptBOOLEANfalse—
noise_mask_featheroptINT200–100—

Outputs (1)

NameTypeDescription
pipePIPE_LINE—