ComfyUI Node
K2 Regional Face Detail
Detects faces, assigns each one to the subject region it sits in, and re-samples a padded crop with ONLY that region's LoRAs before compositing it back with a feathered mask. This is what makes multi-character LoRA routing hold up: in a full-body composition each face covers few latent tokens, so identity gets lost even with perfect regional routing. Refining the crop at full resolution restores it. Detector: any Ultralytics face model (recommended) or the NanoDet face_det.onnx shipped by FantasyPortrait. Both are already present in typical installs — no extra dependency.
K2 Regional Face Detail
- image
- model
- clip
- vae
- plan
- image
- face_mask
- report
◄seed0►
◄steps8►
◄denoise0.35►
◄crop_size512►
◄padding2.0►
◄feather0.12►
◄blend1.00►
◄lora_scale1.00►
◄detectoryolo►
◄detector_model▾►
◄threshold0.40►
◄cfg1.0►
◄sampler_nameeuler►
◄schedulersimple►
◄detector_path►
◄require_region_lorafalse►
CategoryFVM Tools/K2
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Decoded image to inspect and refine. | |
| model | MODEL | Base Krea model. Connect the ORIGINAL model, not the K2 Compose output — regional gating makes no sense on an isolated crop. | |
| clip | CLIP | Krea/Qwen CLIP for the crop prompt. | |
| vae | VAE | VAE used to encode and decode each crop. | |
| plan | K2_PLAN | Plan from K2 Compose — supplies regions, priorities, prompts and LoRA assignments. | |
| seed | INT | 00–18446744073709550000 | Base seed; each face gets a deterministic offset so different faces do not share identical noise. |
| steps | INT | 81–200 | Denoising steps per face crop. |
| denoise | FLOAT | 0.350–1 | Low values keep facial structure, higher values let the LoRA reshape the face. |
| crop_size | INT | 512256–2048 | Working resolution per face crop. |
| padding | FLOAT | 2.01–4 | Expands the detected face box before cropping; more padding includes hair and context. |
| feather | FLOAT | 0.120–0.5 | Soft border of the crop mask as a fraction of the crop size. |
| blend | FLOAT | 1.000–1 | Opacity of the refined crop. 0 keeps the original. |
| lora_scale | FLOAT | 1.000–4 | Extra multiplier on the region LoRAs during the crop pass. |
| detector | COMBO | yolo | yolo: any Ultralytics face model (recommended). nanodet_onnx: the face_det.onnx used by K2Lab. |
| detector_model | COMBO | Ultralytics face model. Ignored when detector is nanodet_onnx. | |
| threshold | FLOAT | 0.400.05–0.95 | Minimum detection confidence. Raise it to reject background faces. |
| cfg | FLOAT | 1.00–100 | Guidance for the crop pass; 1.0 for Turbo. |
| sampler_name | COMBO | euler | Sampler for every crop pass. |
| scheduler | COMBO | simple | Sigma schedule for every crop pass. |
| detector_pathopt | STRING | Explicit path to face_det.onnx. Empty uses the FantasyPortrait auto-discovery path. | |
| require_region_loraopt | BOOLEAN | false | On: only refine regions that actually have a regional LoRA assigned. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| face_mask | MASK | — |
| report | STRING | — |