Nodes/ComfyUI-PromptChain/Prompt Chain Regional Detailer
ComfyUI Node

Prompt Chain Regional Detailer

Face detailing that knows which face is which

By mobcat40·Created 9 months ago·Updated about a month ago· 15
Prompt Chain Regional Detailer
  • model
  • clip
  • vae
  • image
  • masks
  • negative
  • IMAGE
regions
seed0
steps20
cfg7.0
sampler_name
scheduler
denoise0.40
guide_size512
max_size1024
crop_factor2.0
feather24
bbox_threshold0.50
bbox_dilation8
mask_dilation22
drop_size16
face_sourcedetect (yolo)
max_face_angle110
pose

The detect-crop-resample-composite loop behind ADetailer and Impact Pack's FaceDetailer is the standard fix for faces that come out mangled because they only occupy a few dozen pixels of the frame. What neither of those tools solves on its own is a scene with several faces that each need a different prompt - a plain face detailer redetails every detected face with the same shared text. Regional Detailer is PromptChain's answer to that specific gap: it pairs each detected (or posed) face with its own character's prompt from the regions data, then runs the same detect-crop-refine loop per face.

How it works

Two ways to find faces, chosen with face_source. detect (yolo) runs a YOLO detector over the rendered image - the same family of model ADetailer and Impact Pack use - fast, but it can miss a tilted or full-profile head. mannequin heads skips detection entirely and uses the exact head positions exported from the 3D Poser's pose data, which never misses a face the Poser knows about, frontal or in profile, as long as it's facing generally toward the camera. Once a face region is found, it's cropped with padding, upscaled to a working resolution, resampled with its own conditioning, and feathered back into the original at full size - the same mechanism as PromptChain_MaskedDetail, just with automatic detection and per-character prompting layered on top.

The inputs and outputs that matter

The tooltip on model is worth reading literally: it says a base model is preferred over an already-couple-patched one, because each crop is a single region, so plain regional conditioning is cleaner here than reusing an attention-patched model from an Attention Couple pass upstream. clip, vae, and image are the usual sampling trio; regions is Prompt Chain's 4th output, carrying each character's prompt.

Fields worth setting deliberately: denoise (default 0.4) controls how much of each face is actually re-rendered - lower keeps it closer to what was already there. face_source picks the detection mode above, and if you use mannequin heads, wire the optional pose input or the node has nothing to place heads with. max_face_angle (default 110°) only matters in mannequin mode - it culls heads turned more than that many degrees from camera, and the default is generous enough to keep frontal, three-quarter, and full-profile faces, only dropping ones facing fully away. bbox_threshold and bbox_dilation only matter in detect mode - confidence cutoff and how far to grow a detected box. mask_dilation grows the figure's silhouette (not the face box) before it bounds the re-render, so hair or headgear extending past the mannequin's edge doesn't get clipped. drop_size skips any detected face below that many pixels - useful for ignoring background extras. The optional negative input takes a shared negative if you have one; leave it unwired and it defaults to whatever negative is already in the regions JSON.

Single IMAGE output - the composited result, ready for your next step, whether that's an upscale or straight to output.

How to install it

Manager: search ComfyUI-PromptChain. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/mobcat40/ComfyUI-PromptChain.git

Face detailing is one of the pack's self-installing optional features - expect a first-use prompt to install its own detector and any missing model files, with progress shown live, rather than a separate Manager step.

Common issues & troubleshooting

A profile or tilted face gets skipped entirely. That's detect (yolo) doing what YOLO detectors always do with off-angle faces - miss them. If you posed the scene in the 3D Poser, switch to face_source: mannequin heads and wire pose; it works from known head positions instead of hoping the detector finds them.

Faces across a crowd start looking similar. This node takes one seed for the whole pass, same as most detailer implementations - when several faces are detailed in one run off a single seed, expect some convergence in how they come out, the way any single-seed multi-face detailer behaves. Rerun with a different seed on the outlier if one face needs to stand apart from the rest.

A face's prompt doesn't match the character. Confirm regions is actually wired from Prompt Chain, and if you're on mannequin-heads mode, that pose is wired too - name binding runs through the same $name{} mechanism as the rest of the pack.

Categorypromptchain

Inputs (24)

NameTypeDefaultDescription
modelMODELBase model preferred — the crop is a single region, so plain regional conditioning is cleaner than the couple-patched model.
clipCLIP
vaeVAE
imageIMAGE
regionsSTRINGWire to Prompt Chain's 'regions' output (4th).
seedINT00–18446744073709550000
stepsINT201–100
cfgFLOAT7.00–30
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.400–1How much of the face is re-rendered.
guide_sizeINT51264–2048Upscale the crop so the face spans about this many pixels.
max_sizeINT102464–4096Cap on the sampled crop's long side.
crop_factorFLOAT2.01–8Context padding around the face bbox.
featherINT240–128Falloff width (px) outside the face box — bounds both the re-rendered area and the composite blend.
bbox_thresholdFLOAT0.500–1Face detection confidence threshold.
bbox_dilationINT80–128Grow each detected face box by this many pixels.
mask_dilationINT220–128Grow the figure silhouette before it bounds the re-rendered area, so hair/headgear past the mannequin isn't clipped.
drop_sizeINT160–512Skip faces smaller than this many pixels.
face_sourceCOMBOdetect (yolo)detect: find rendered faces with YOLO (can miss tilted/profile heads). mannequin heads: use the Poser's exact head positions for any head facing the camera — never misses, needs the 'pose' input wired.
max_face_angleINT1100–180Mannequin mode: skip heads turned more than this many degrees away from the camera. The default (110) keeps every visible face — frontal, three-quarter, and full profile — and only culls heads facing away. Lower it to restrict to frontal faces.
masksoptMASKPer-figure masks from the 3D Poser MASKS output.
poseoptSTRINGWire to the 3D Poser's POSE_JSON output — provides exported head boxes for 'mannequin heads' mode.
negativeoptCONDITIONINGShared negative; defaults to the regions JSON negative.

Outputs (1)

NameTypeDescription
IMAGEIMAGE