Person Detailer ControlNet
Person Detailer with depth and pose baked in — one model, auto-generated control maps
- images
- person_data
- model
- clip
- vae
- positive_base
- negative
- dd_options
- inpaint_options
- images
- refined
- refined_references
- refined_generic
The plain Person Detailer is great until it isn't. The failure mode: an inpaint pass that's supposed to just refine a face decides to re-invent the pose or throw in a second nose, because the sampler has no structural information about what's actually in the masked region. PersonDetailerControlNet is the answer - it's Person Detailer with a Z-Image ControlNet Union model strapped on. For every person crop it automatically generates a depth map or a DWPose skeleton, encodes it, and applies it as ControlNet conditioning so the detail pass has to respect the geometry that's already there.
This is aimed squarely at Z-Image Turbo (Lumina2) workflows. The whole thing is built around a ControlNet Union model patch - one model that handles depth, pose, canny and inpainting - loaded from ComfyUI's models/model_patches/ directory. If you're not on Z-Image, or you leave model_patch at "None", the node degrades gracefully to behaving exactly like Person Detailer, so you lose nothing by trying it.
How it works
Beyond every Person Detailer feature (5 reference slots, generic catch-all, LoRA caching, Detail Daemon, multi-round latent cycling), it adds:
control_type-depth,pose, ordepth+pose. Depth mode runs DepthAnythingV2 on each crop; pose mode runs DWPose to get a skeleton. Both get applied as separate patches in the third mode.control_strength- base ControlNet strength (default 0.3). This is where the clever part lives: the node auto-scales it down as denoise rises, usingeffective = control_strength * (1.0 - denoise * 0.5). At denoise 0.52 and strength 0.5 you get an effective 0.37, logged to console asdepth s=0.50->0.37. The reasoning is sound - at high denoise the inpaint is rewriting a lot, and full-strength ControlNet at high denoise is how you get pose artifacts bleeding in. Lower denoise means you can afford stronger control.cn_resolution- the preprocessing resolution (default 512).depth_model- which DepthAnythingV2 checkpoint to use:vitlis the balanced default,vitgis best quality,vitsis fastest.- Pose maps get a Gaussian blur that scales with resolution, specifically to stop hard skeleton lines from bleeding into the output as visible edges.
The input that gates everything
controlnet_enabled (default on) - flipping it off turns this into plain Person Detailer, which is also your built-in A/B switch. Worth remembering when you're debugging: if the image looks worse with control on, the fix isn't necessarily to turn it off - try dropping control_strength first. A face with too much structural constraint comes out stiff, not wrong.
Outputs mirror Person Detailer: images (stitched result), refined, refined_references, refined_generic (crop grids).
Installing
Same pack as the rest of the face tools:
cd ComfyUI/custom_nodes
git clone https://github.com/ping1979ping/comfyui-FVMtools
pip install insightface>=0.7.3 onnxruntime-gpu>=1.17.0 opencv-python>=4.8.0 numpy>=1.24.0
But it needs more models than the base nodes, and this is where people stall. You need the Z-Image ControlNet Union patch in models/model_patches/, the DepthAnythingV2 .pth in your controlnet/diffusion models folder, and DWPose models for pose mode. None of these auto-download. The depth checkpoints (depth_anything_v2_vitl.pth etc.) are from the Depth Anything V2 repo; the ControlNet Union patch comes from wherever you get your Z-Image control models. If the model_patch dropdown shows only "None", that's the tell - you haven't put a patch in model_patches/ yet.
The honest caveat
This node is new enough and niche enough that the model-loading story is the real barrier. It's not a "wire it up in 30 seconds" experience the way the color nodes are. But if you're doing Z-Image character work and your refined faces keep drifting in pose or depth, this is the specific tool for that specific problem - and the auto-scaling strength logic is genuinely thoughtful, the kind of detail a beginner wouldn't know to set by hand.
Inputs (52)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Input image batch [B, H, W, C] | |
| person_data | PERSON_DATA | Person data from Person Selector Multi node | |
| model | MODEL | Base model (Z-Image Turbo or other) | |
| clip | CLIP | CLIP model for prompt encoding | |
| vae | VAE | VAE for encode/decode (also used to encode control images for the model patch) | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 41–100 | — |
| denoise | FLOAT | 0.520–1 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| detail_daemon_enabled | BOOLEAN | true | — |
| detail_amount | FLOAT | 0.20-5–5 | — |
| dd_smooth | BOOLEAN | true | — |
| mask_blend_pixels | INT | 320–128 | — |
| mask_expand_pixels | INT | 00–64 | — |
| target_width | INT | 80064–4096 | — |
| target_height | INT | 120064–4096 | — |
| controlnet_enabled | BOOLEAN | true | Enable/disable ControlNet guidance. When off, behaves like Person Detailer. |
| model_patch | COMBO | Z-Image ControlNet Union model patch from models/model_patches/. | |
| control_type | COMBO | depth | Which control signal to generate from each crop: depth — structural depth guidance (DepthAnythingV2) pose — skeletal pose guidance (DWPose) depth+pose — both applied as separate patches |
| control_strength | FLOAT | 0.300–2 | ControlNet Union strength. 0 = disabled. |
| cn_resolution | INT | 51264–2048 | Resolution for DWPose/DepthAnything preprocessors |
| depth_model | COMBO | depth_anything_v2_vitl.pth | DepthAnythingV2 checkpoint (vitl=balanced, vitg=best, vits=fastest) |
| reference_1_enabled | BOOLEAN | true | Enable reference slot 1 for detailing |
| reference_1_lora | COMBO | LoRA to apply when detailing reference 1 | |
| reference_1_lora_strength | FLOAT | 1.000–2 | LoRA strength for reference 1 |
| reference_1_prompt | STRING | Positive prompt for reference 1. If empty, uses base conditioning. | |
| reference_2_enabled | BOOLEAN | false | Enable reference slot 2 for detailing |
| reference_2_lora | COMBO | LoRA to apply when detailing reference 2 | |
| reference_2_lora_strength | FLOAT | 1.000–2 | LoRA strength for reference 2 |
| reference_2_prompt | STRING | Positive prompt for reference 2. If empty, uses base conditioning. | |
| reference_3_enabled | BOOLEAN | false | Enable reference slot 3 for detailing |
| reference_3_lora | COMBO | LoRA to apply when detailing reference 3 | |
| reference_3_lora_strength | FLOAT | 1.000–2 | LoRA strength for reference 3 |
| reference_3_prompt | STRING | Positive prompt for reference 3. If empty, uses base conditioning. | |
| reference_4_enabled | BOOLEAN | false | Enable reference slot 4 for detailing |
| reference_4_lora | COMBO | LoRA to apply when detailing reference 4 | |
| reference_4_lora_strength | FLOAT | 1.000–2 | LoRA strength for reference 4 |
| reference_4_prompt | STRING | Positive prompt for reference 4. If empty, uses base conditioning. | |
| reference_5_enabled | BOOLEAN | false | Enable reference slot 5 for detailing |
| reference_5_lora | COMBO | LoRA to apply when detailing reference 5 | |
| reference_5_lora_strength | FLOAT | 1.000–2 | LoRA strength for reference 5 |
| reference_5_prompt | STRING | Positive prompt for reference 5. If empty, uses base conditioning. | |
| generic_enabled | BOOLEAN | false | Enable detailing for unmatched faces |
| generic_catch_unprocessed | BOOLEAN | true | ON: detail all faces not processed by active slots. OFF: only truly unmatched faces. |
| generic_lora | COMBO | LoRA for unmatched faces | |
| generic_lora_strength | FLOAT | 1.000–2 | LoRA strength for unmatched faces |
| generic_prompt | STRING | Positive prompt for unmatched faces. | |
| positive_baseopt | CONDITIONING | Base positive conditioning | |
| negativeopt | CONDITIONING | Negative conditioning | |
| dd_optionsopt | DD_OPTIONS | Advanced Detail Daemon parameters | |
| inpaint_optionsopt | INPAINT_OPTIONS | Advanced inpaint settings |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| refined | IMAGE | — |
| refined_references | IMAGE | — |
| refined_generic | IMAGE | — |