comfyui-upscale-facedetail-chain
comfyui-upscale-facedetail-chain
On this page
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:
- "ComfyUI upscale face detail chain order"
- "FaceDetailer guide_size prevent repaint whole image"
- "FaceDetailerPipe multipass workflow ComfyUI"
- "extra_model_paths.yaml ultralytics_bbox ultralytics_segm"
- "ComfyUI Impact Pack FaceDetailer node inputs"
sources:
- "https://civitai.com/articles/3898"
- "https://civitai.com/articles/4237"
- "https://raw.githubusercontent.com/ltdrdata/ComfyUI-Impact-Pack/Main/README.md"
- "https://raw.githubusercontent.com/ltdrdata/ComfyUI-extension-tutorials/Main/ComfyUI-Impact-Pack/tutorial/detailers.md"
- "https://raw.githubusercontent.com/ltdrdata/ComfyUI-extension-tutorials/Main/ComfyUI-Impact-Pack/tutorial/detectors.md"
- "https://raw.githubusercontent.com/ltdrdata/ComfyUI-Impact-Subpack/Main/README.md"
- "https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/README.md"
- "https://raw.githubusercontent.com/Bing-su/adetailer/main/README.md"
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:
| Parameter | What it does |
|---|---|
guide_size | Reference size; SEGS smaller than this are enlarged to match it; larger SEGS are skipped |
guide_size_for | bbox uses the detector box; crop_region uses the expanded crop region |
max_size | Hard cap on the longer side of the crop |
force_inpaint | Disables the skip — inpaints even if the SEG is already ≥ guide_size |
noise_mask | Applies a noise mask during inpainting |
inpaint_model | Must be true when using a dedicated inpainting checkpoint at denoise < 1.0 |
noise_mask_feather | Feathers the mask edge; may create artifacts |
refiner_ratio | SDXL refiner step proportion |
cycle | Number 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
| Component | Source | Install method |
|---|---|---|
| ComfyUI-Impact-Pack | GitHub ltdrdata/ComfyUI-Impact-Pack | ComfyUI-Manager → Install Custom Nodes → search "Impact Pack" |
| ComfyUI-Impact-Subpack | GitHub ltdrdata/ComfyUI-Impact-Subpack | Manager → search "Impact Subpack" (provides UltralyticsDetectorProvider) |
| BBOX models (face, hand) | HuggingFace Bingsu/adetailer or Ultralytics assets | Download .pt files to models/ultralytics/bbox/ |
| SEGM models (person) | HuggingFace Bingsu/adetailer | Download to models/ultralytics/segm/ |
| SAM model | Facebook segment-anything | sam_vit_b_01ec64.pth → models/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
| Symptom | Cause | Fix |
|---|---|---|
BBOX/SEGM models downloaded but invisible in UltralyticsDetectorProvider dropdown | extra_model_paths.yaml missing ultralytics_bbox / ultralytics_segm entries | Add paths pointing to models/ultralytics/bbox and models/ultralytics/segm; restart ComfyUI |
UltralyticsDetectorProvider node not found in node menu | Only Impact Pack installed, not Impact Subpack | Install ComfyUI-Impact-Subpack separately (Manager → "Impact Subpack") |
| "Install missing nodes" not obvious in Manager | Button is labeled Install Missing Custom Nodes in the Manager menu | Open Manager menu → click Install Missing Custom Nodes |
| YAML parse error on startup | Tabs or incorrect indentation in extra_model_paths.yaml | Use 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
- Civitai article 3898 — 0l1v1aR0551, "ComfyUI Workflow with a Facedetailer (Simple but very Nice!)" — workflow attachment, RedOlives model reference, SD1.5 VAE note, Manager missing-nodes tip. https://civitai.com/articles/3898
- Civitai article 4237 — KeyTail, "[ComfyUI] T2I → Upscaling → (Auto) Face Detailing → (Auto) Hands Detailing" — workflow order, test result images, Windows
extra_model_paths.yamladdendum. https://civitai.com/articles/4237 - ComfyUI-Impact-Pack README — node list, installation via Manager, Subpack separation notice, version compatibility notes. https://raw.githubusercontent.com/ltdrdata/ComfyUI-Impact-Pack/Main/README.md
- Impact Pack detailers tutorial —
guide_size,force_inpaint,max_size,noise_mask,inpaint_model,cycleparameter definitions. https://raw.githubusercontent.com/ltdrdata/ComfyUI-extension-tutorials/Main/ComfyUI-Impact-Pack/tutorial/detailers.md - Impact Pack detectors tutorial — BBOX/SEGM/SAM detector types,
UltralyticsDetectorProvider,SimpleDetector, mask intersection logic. https://raw.githubusercontent.com/ltdrdata/ComfyUI-extension-tutorials/Main/ComfyUI-Impact-Pack/tutorial/detectors.md - ComfyUI-Impact-Subpack README —
UltralyticsDetectorProvidernode, model directory structure (models/ultralytics/bbox,models/ultralytics/segm),extra_model_paths.yamlkeys (ultralytics_bbox,ultralytics_segm). https://raw.githubusercontent.com/ltdrdata/ComfyUI-Impact-Subpack/Main/README.md - ComfyUI-Manager README — "Install Missing Custom Nodes" button behavior, Manager menu location, snapshot/restore workflow. https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/README.md
- ADetailer README (Bing-su/adetailer) — YOLO model table (
face_yolov8n.ptmAP 0.660,hand_yolov8n.ptmAP 0.767), three-step detection → mask → inpainting pipeline. https://raw.githubusercontent.com/Bing-su/adetailer/main/README.md
[END]