Nodes/comfyui-fvmtools/K2 Regional Face Detail
ComfyUI Node

K2 Regional Face Detail

The pass that keeps character identities alive in full-body shots

By ping1979ping·Created 6 months ago·Updated about a month 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

K2 Regional Face Detail is the node that keeps multi-character LoRA routing honest. In a full-body composition, each face covers only a handful of latent tokens - Krea 2's image tokens are 16×16 output pixels, so a face in a full-body frame is a rounding error. Even with perfect regional routing, the identity gets lost because there simply aren't enough tokens to carry it. This node fixes that the old-school way: it detects faces, assigns each one to the subject region its box sits in, and re-samples a padded crop at full resolution using only that region's LoRAs, then composites it back with a feathered mask.

It's the face-refinement stage of the K2 Lab suite in comfyui-FVMtools, and it's the difference between "two characters, kind of" and "two recognizable characters." For character-consistency work this is the node you'll actually reach for every run.

The inputs that matter

  • image - the decoded render to inspect and refine.
  • model - the base Krea model, not the K2 Compose output. The tooltip is explicit: regional gating makes no sense on an isolated crop, so connect the original model.
  • clip, vae, plan - the encoder, the VAE, and the plan from K2 Compose (which supplies regions, priorities, prompts, and LoRA assignments).
  • denoise - low values keep facial structure, higher values let the LoRA reshape the face. Start around 0.35.
  • crop_size - working resolution per face crop (default 512).
  • padding - expands the detected face box before cropping, so you get hair and context (default 2).
  • feather and blend - the crop's soft border (as a fraction of crop size) and opacity. blend 0 keeps the original.
  • lora_scale - an extra multiplier on the region LoRAs during the crop pass. This is the "turn the character's identity up for the face" knob.
  • detector - yolo (any Ultralytics face model, recommended) or nanodet_onnx (the face_det.onnx used by K2Lab). Both are typically already in an install - no extra dependency. detector_model picks the Ultralytics file; threshold rejects background faces.
  • cfg, sampler_name, scheduler - guidance and schedule for each crop pass. 1.0 CFG for Turbo, euler/simple.

Optional: detector_path (explicit path to face_det.onnx; empty uses FantasyPortrait auto-discovery) and require_region_lora (only refine regions that actually have a regional LoRA assigned).

Outputs: image (refined), face_mask, and a report of what was detected and refined. Each face gets a deterministic seed offset so different faces don't share identical noise.

The gotcha

Connecting the Compose-patched model here is the classic mistake - it renders crops that look wrong and you'll blame the LoRA. Use the original model. Everything else is tuning: if identity still washes out, raise lora_scale or denoise, don't chase it with the base pass.

Install

Same as the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/ping1979ping/comfyui-FVMtools

Restart ComfyUI, find it under FVM Tools/K2. No extra Python dependencies, and the face detector is whatever your workflow already has.

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