Nodes/comfyui-fvmtools/K2 Regional Face Detail
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.

By ping1979ping·Created 5 months ago·Updated 21 days ago· 0
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)

NameTypeDefaultDescription
imageIMAGEDecoded image to inspect and refine.
modelMODELBase Krea model. Connect the ORIGINAL model, not the K2 Compose output — regional gating makes no sense on an isolated crop.
clipCLIPKrea/Qwen CLIP for the crop prompt.
vaeVAEVAE used to encode and decode each crop.
planK2_PLANPlan from K2 Compose — supplies regions, priorities, prompts and LoRA assignments.
seedINT00–18446744073709550000Base seed; each face gets a deterministic offset so different faces do not share identical noise.
stepsINT81–200Denoising steps per face crop.
denoiseFLOAT0.350–1Low values keep facial structure, higher values let the LoRA reshape the face.
crop_sizeINT512256–2048Working resolution per face crop.
paddingFLOAT2.01–4Expands the detected face box before cropping; more padding includes hair and context.
featherFLOAT0.120–0.5Soft border of the crop mask as a fraction of the crop size.
blendFLOAT1.000–1Opacity of the refined crop. 0 keeps the original.
lora_scaleFLOAT1.000–4Extra multiplier on the region LoRAs during the crop pass.
detectorCOMBOyoloyolo: any Ultralytics face model (recommended). nanodet_onnx: the face_det.onnx used by K2Lab.
detector_modelCOMBOUltralytics face model. Ignored when detector is nanodet_onnx.
thresholdFLOAT0.400.05–0.95Minimum detection confidence. Raise it to reject background faces.
cfgFLOAT1.00–100Guidance for the crop pass; 1.0 for Turbo.
sampler_nameCOMBOeulerSampler for every crop pass.
schedulerCOMBOsimpleSigma schedule for every crop pass.
detector_pathoptSTRINGExplicit path to face_det.onnx. Empty uses the FantasyPortrait auto-discovery path.
require_region_loraoptBOOLEANfalseOn: only refine regions that actually have a regional LoRA assigned.

Outputs (3)

NameTypeDescription
imageIMAGE
face_maskMASK
reportSTRING