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

PreDetailerFix

Set up a face/hand detail pass the Easy-Use way

By yolain·Created 3 years ago·Updated 8 days ago· 2,633
PreDetailerFix
  • pipe
  • bbox_segm_pipe
  • sam_pipe
  • optional_image
  • pipe
guide_size256
guide_size_fortrue
max_size768
seed0
steps20
cfg8.00
sampler_name
scheduler
denoise0.50
feather5
noise_masktrue
force_inpainttrue
drop_size10
wildcard
cycle1

A face that occupies 80x80 pixels of a 1024x1024 frame gets 80x80 pixels' worth of the model's attention, and it comes out mangled - melted eyes, mush where the mouth should be. The fix everyone uses is detect-crop-refine: find the face, crop it out, run a fresh sampling pass on it at proper resolution, paste it back. That's what Impact Pack's FaceDetailer does, and it's what easy preDetailerFix wraps in the Easy-Use pipe style.

Like the pack's other "pre" nodes, this one configures the detail pass rather than running it. It bundles all your detailer settings into a pipe that the actual sampler node (easy detailerFix) then executes. It's the same split-in-two philosophy the pack applies to normal sampling, here applied to Impact Pack's detailer loop.

How it works

You feed it a detection pipe - from easy ultralyticsDetectorPipe (a YOLO detector that finds faces/hands) and/or easy samLoaderPipe (Segment Anything for tighter masks) - plus your main pipe. It packages the detection setup and the resample settings together and hands out a pipe for easy detailerFix to run. Under the hood this is Impact Pack machinery (ltdrdata's detect-crop-refine), just presented through Easy-Use's one-wire interface. Note that the YOLO detector models now live in Impact's separately-installed Subpack, so you need that too.

The inputs that matter

Most of these mirror a KSampler because the detail pass is a small sampling pass:

  • denoise (default 0.5) - the single most important knob. This controls how much the cropped region gets regenerated. 0.4-0.55 is the sweet spot: enough to fix the face, not so much that it becomes a different person. Push toward 0.7+ and identity drifts; drop below 0.3 and nothing changes.
  • guide_size (256) and max_size (768) - the resolution band the detected crop gets resampled at. This is what buys back the detail; the crop is scaled into this range before the fresh pass.
  • steps, cfg, sampler_name, scheduler, seed - the resample's sampling settings.
  • feather (5) and noise_mask - control how the refined crop blends back in. Feathering softens the seam so the paste-back doesn't show.
  • wildcard - an optional prompt just for the detail pass (e.g. force "detailed eyes" only on the face).
  • bbox_segm_pipe and sam_pipe (optional) - your detector pipes. At least one detector is what tells the node where to look. optional_image lets you point the fix at an image other than the one in the pipe.

Output is the pipe, wired straight into easy detailerFix.

How to install it

Install the pack via ComfyUI Manager ("ComfyUI Easy Use") or:

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

Then install.bat / pip install -r requirements.txt, restart. Preinstalled on comfy.icu. Because the detection side leans on Impact Pack, install ComfyUI-Impact-Pack and its Impact Subpack too, and grab a detector model (the Bingsu face_yolov8 weights are the standard) for the detector pipe.

Common issues

The one that bites hardest: setting denoise too high. People crank it expecting a "better" fix and get a face that no longer matches the body. Start at 0.5 and move down if identity shifts.

Second, "no faces detected" almost always means the detector pipe isn't wired or has no model loaded - this node doesn't detect anything itself, it just carries the settings. Check that a ultralyticsDetectorPipe with a real YOLO model feeds bbox_segm_pipe. And honest caveat from the wider community: if the face is already large and sharp in frame, a detail pass changes it without improving it. The most-upvoted reaction to a lot of detailer demos is that the before and after look identical - this technique is for small, botched regions, not for polishing something that's already fine.

CategoryEasyUse/Fix

Inputs (19)

NameTypeDefaultDescription
pipePIPE_LINE
guide_sizeFLOAT25664–16384
guide_size_forBOOLEANtrue
max_sizeFLOAT76864–16384
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.000–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO10 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +4
denoiseFLOAT0.500.0001–1
featherINT50–100
noise_maskBOOLEANtrue
force_inpaintBOOLEANtrue
drop_sizeINT101–16384
wildcardSTRING
cycleINT11–10
bbox_segm_pipeoptPIPE_LINE
sam_pipeoptPIPE_LINE
optional_imageoptIMAGE

Outputs (1)

NameTypeDescription
pipePIPE_LINE