ArtificialGuyBR

Home / Blog / ComfyUI

comfyui-upscale-facedetail-chain

comfyui-upscale-facedetail-chain

0 sources cited ComfyUI

title: "ComfyUI Upscale + FaceDetailer Chain: Node Order & Settings" description: "Correct node order for upscale then FaceDetailer, and guide_size/force_inpaint settings that prevent full-frame repaints." slug: "comfyui-upscale-face-detail-chain" updated: "2026-07-27" keywords:

sources:


TL;DR

Run upscale first, then FaceDetailer. Set guide_size to your target face crop resolution and keep force_inpaint: false — this skips faces already larger than guide_size, preventing full-frame repaints. The pipeline: T2I → upscale → detect faces (YOLO+BBOX+SAM) → FaceDetailer → optional hand detail pass.

FaceDetailer internals: the parameters that control repaints

The Detailer tutorial lists the options that every Detailer-node variant (including FaceDetailer) inherits:

ParameterWhat it does
guide_sizeReference size; SEGS smaller than this are enlarged to match it; larger SEGS are skipped
guide_size_forbbox uses the detector box; crop_region uses the expanded crop region
max_sizeHard cap on the longer side of the crop
force_inpaintDisables the skip — inpaints even if the SEG is already ≥ guide_size
noise_maskApplies a noise mask during inpainting
inpaint_modelMust be true when using a dedicated inpainting checkpoint at denoise < 1.0
noise_mask_featherFeathers the mask edge; may create artifacts
refiner_ratioSDXL refiner step proportion
cycleNumber of detail iterations per SEG

Key insight: the "skip" behavior is baked into guide_size. If a detected face crop is already ≥ guide_size, the Detailer does not enlarge it and does not inpaint it — unless force_inpaint is enabled. This is the setting that stops a pass from repainting the whole frame: leave force_inpaint off, set guide_size to the resolution you want faces inpainted at, and any face larger than that in the upscaled image will be left alone.


Minimal working node graph

Load Checkpoint → KSampler (T2I)
      ↓
UpscaleModelLoader → ImageUpscaleWithModel
      ↓
UltralyticsDetectorProvider (bbox/face_yolov8m.pt) → BBoxDetectorForEach
      ↓
SAMLoader (sam_vit_b_01ec64.pth) → SAMDetectorCombined
      ↓
FaceDetailer
   ├─ model, clip, vae, positive, negative (or DETAILER_PIPE)
   ├─ guide_size_for: bbox
   ├─ force_inpaint: false
   ├─ noise_mask: true
   └─ cycle: 1
      ↓
Save Image

For a second pass on hands, feed the same upscaled image into a parallel chain that swaps the BBOX model to bbox/hand_yolov8n.pt (or a segm/person_yolov8n-seg.pt + SAM) and runs another FaceDetailer (or Detailer (SEGS)) with guide_size_for: bbox. See Hand detailing workflows for alternatives. For installation details, see ComfyUI Manager essentials and Impact Pack tutorials.


Installing the required packs and models

ComponentSourceInstall method
ComfyUI-Impact-PackGitHub ltdrdata/ComfyUI-Impact-PackComfyUI-Manager → Install Custom Nodes → search "Impact Pack"
ComfyUI-Impact-SubpackGitHub ltdrdata/ComfyUI-Impact-SubpackManager → search "Impact Subpack" (provides UltralyticsDetectorProvider)
BBOX models (face, hand)HuggingFace Bingsu/adetailer or Ultralytics assetsDownload .pt files to models/ultralytics/bbox/
SEGM models (person)HuggingFace Bingsu/adetailerDownload to models/ultralytics/segm/
SAM modelFacebook segment-anythingsam_vit_b_01ec64.pthmodels/sams/

Manager shortcut: if a workflow loads with red "missing node" badges, open the Manager menu and click Install Missing Custom Nodes — it scans the workflow JSON, matches unknown node types to its registry, and offers one-click installs for Impact Pack, Impact Subpack, and any other missing extensions.


Configuring extra_model_paths.yaml so models appear

On Windows (ComfyUI Desktop), the file lives under the instance folder shown in Manager → Manage → Storage → MODELS/Use Shared Models. If only extra_model_paths.yaml.sample exists, copy it, rename to extra_model_paths.yaml, and edit (UTF-8, spaces only — no tabs):

ultralytics_bbox: D:/ComfyUI/models/ultralytics/bbox
ultralytics_segm: D:/ComfyUI/models/ultralytics/segm

The Impact Subpack README documents the keys as ultralytics_bbox and ultralytics_segm; forward slashes work on Windows, backslashes are untested. Restart ComfyUI after saving.


RedOlives model note (SDXL vs SD 1.5)

The workflow in article 3898 was built for the RedOlives merge (Civitai model 283810). The Civitai API returns an empty baseModel field for this model; its description references SDXL-Lightning in one version name. If you swap to an SD 1.5 checkpoint, you must also swap the VAE — article 3898 notes this explicitly.


Common errors and fixes

SymptomCauseFix
BBOX/SEGM models downloaded but invisible in UltralyticsDetectorProvider dropdownextra_model_paths.yaml missing ultralytics_bbox / ultralytics_segm entriesAdd paths pointing to models/ultralytics/bbox and models/ultralytics/segm; restart ComfyUI
UltralyticsDetectorProvider node not found in node menuOnly Impact Pack installed, not Impact SubpackInstall ComfyUI-Impact-Subpack separately (Manager → "Impact Subpack")
"Install missing nodes" not obvious in ManagerButton is labeled Install Missing Custom Nodes in the Manager menuOpen Manager menu → click Install Missing Custom Nodes
YAML parse error on startupTabs or incorrect indentation in extra_model_paths.yamlUse spaces only (no tabs); validate with a YAML linter

FAQ

What order should upscale and face detail nodes be in a ComfyUI workflow? Run upscale first, then FaceDetailer. The documented workflow in article 4237 uses T2I → upscale → face detail → hand detail, and the Impact Pack docs confirm FaceDetailer inpaints only the detected SEGS regions at their current pixel size.

How does FaceDetailer prevent repainting the whole image instead of just the face? FaceDetailer works on SEGS (detection regions), not the full frame. It crops each detected face, optionally resizes the crop to guide_size, inpaints that crop, and pastes it back. Regions larger than guide_size are skipped unless force_inpaint is enabled.

What is the difference between FaceDetailer and FaceDetailerPipe nodes? FaceDetailer is a single-pass node. FaceDetailer (pipe) accepts and outputs a DETAILER_PIPE bundle (model, CLIP, VAE, positive, negative) so the same pipe can be reused across multiple detail passes or chained with other pipe-based nodes.

How do I configure extra_model_paths.yaml for YOLO BBOX models in ComfyUI? Add ultralytics_bbox and ultralytics_segm keys pointing to your models/ultralytics/bbox and models/ultralytics/segm directories. Use spaces (not tabs) for indentation; forward slashes work on Windows.

Does ComfyUI Manager have an "install missing nodes" feature? Yes — the Manager menu contains Install Missing Custom Nodes. It scans the current workflow for unrecognized node types, matches them to its registry, and offers one-click installation.

Why do I need both Impact Pack and Impact Subpack? Impact Pack contains the FaceDetailer and Detailer nodes. Impact Subpack contains UltralyticsDetectorProvider, which loads the YOLO BBOX/SEGM models that FaceDetailer uses for detection. They are maintained as separate packages. Can I run face detail before upscale instead? You can, but the inpainting crop will be smaller (limited by the pre-upscale face region). The subsequent upscale will stretch those inpainted pixels. No published A/B comparison exists, but the documented workflows all place upscale first.


Sources


[END]