RP Regional Detailer (SDXL)
The detailer pass where per-region LoRAs finally do their job
- image
- model
- clip
- vae
- regional_prompts_nolora
- regional_lora_map
- regional_col_n_row
- negative
- divide_mode
- divide_ratio
- image
- debug_image
What it is
The sampler gives you a good draft; this node makes each character look right. RP Regional Detailer (SDXL) is the pack's detect-and-inpaint refinement stage, in the direct lineage of ADetailer and Impact Pack's FaceDetailer: run a detector over the finished image, then give every found subject its own full-resolution inpainting pass. For regional prompting it's the payoff - this is where each region's LoRA actually gets applied in isolation, something the sampler fundamentally can't do.
How it works
Since v0.6.00 the flow is one clean YOLO pass:
- Run YOLO once over the full image, detecting people.
- Assign each bbox to a region by comparing its center coordinate against the divide_ratio boundaries - Horizontal, Vertical, and 2D grids all work.
- Two people land in the same region? The largest area wins; the rest get fallback inpainting using the base prompt (COMMON + BASE).
- For each assigned bbox: mask dilation + blur → upscale the crop (LANCZOS) → VAE encode → inpaint with that region's own prompt (COMMON + BASE + DIV) and its own LoRA → blend back through the mask.
That last point is the whole reason this node exists. Each region's LoRA is loaded independently before inpainting, so the blonde character's LoRA stays on the left and the other's stays on the right. Real isolation, at the cost of one inpaint pass per person.
The inputs you'll actually set
- model, clip, vae, negative: your checkpoint plus a CONDITIONING negative.
- regional_prompts_nolora, regional_lora_map: from the parser. regional_col_n_row: from RPRatioParser. divide_mode: from the parser.
- bbox_model:
bbox/person_yolov8m-seg.ptor thesegm/variant - the dropdown scansmodels/ultralytics/. - detect_threshold: 0.3 default YOLO confidence; lower it if people are being missed.
- denoise: how much each region changes from the draft, 0.5 default.
- scale_to_pixel: upscales small crops to this target (1024 default) before inpainting - this is what gives a 60px face real generation budget instead of a smudge.
- mask_padding / mask_blur / mask_dilation / feather: the mask surgery dials; the defaults are sane, tweak only when edges misbehave.
- use_base / use_common: match the parser.
Outputs
image (IMAGE) → your finished render. debug_image (IMAGE) overlays the detected bboxes and region assignment - invaluable when a person keeps getting assigned to the wrong region.
Dependencies and gotchas
This node is where the pack stops being dependency-light: it needs ultralytics and opencv-python (both in requirements.txt, marked optional - install them if the node complains). Put the YOLO .pt file in ComfyUI/models/ultralytics/bbox/; the dropdown auto-detects from that folder, so an empty dropdown means a wrong path. It's the standard detect-crop-refine pattern, so expect a first-run model download and, if you're on a small card, patience while each person gets their own pass.
Inputs (29)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| regional_prompts_nolora | RP_SUBPROMPTS | — | |
| regional_lora_map | RP_LORA_MAP | — | |
| regional_col_n_row | RP_REGIONS | — | |
| negative | CONDITIONING | — | |
| divide_mode | RP_DIV_MODE | Horizontal | — |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–200 | — |
| cfg | FLOAT | 5.00–30 | — |
| 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 | |
| denoise | FLOAT | 0.500–1 | — |
| feather | INT | 00–64 | Feather (soft edge) radius in pixels. Blends mask edges smoothly. Applied after dilation. |
| noise_mask | BOOLEAN | true | Apply noise mask to latent before sampling. Helps preserve areas outside the inpainting region. |
| force_inpaint | BOOLEAN | true | Force inpainting mode regardless of model type. Recommended for best inpainting results. |
| bbox_model | COMBO | 2 options: bbox/person_yolov8m-seg.pt, segm/person_yolov8m-seg.pt | |
| detect_threshold | FLOAT | 0.300.1–1 | YOLO detection confidence threshold. |
| drop_size | INT | 101–16384 | Minimum detection size (px). Bboxes with short side below this are ignored. |
| mask_padding | INT | 320–256 | Mask padding in pixels (image space). |
| mask_blur | INT | 80–64 | Blur radius for mask edges. |
| mask_dilation | INT | 40–64 | Mask dilation in pixels. Expands the mask boundary to widen the inpainting area. |
| scale_to_pixel | INT | 102464–4096 | Target pixel size for upscaling. Masks smaller than this are upscaled before inpainting. Masks larger than this are processed as-is. |
| use_base | BOOLEAN | false | Prepend BASE prompt to each COL prompt during processing. |
| use_common | BOOLEAN | true | — |
| debug | BOOLEAN | false | Print debug log when enabled. |
| divide_ratioopt | RP_DIV_RATIO | 1,1 | Connect divide_ratio from RPPromptParser. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| debug_image | IMAGE | — |