From 73e06d262a7873225346ea2bccaed25eaa7b5124 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Tue, 9 Jun 2026 09:41:00 +0300 Subject: [PATCH] Update face_landmarker.py --- comfy_extras/mediapipe/face_landmarker.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/comfy_extras/mediapipe/face_landmarker.py b/comfy_extras/mediapipe/face_landmarker.py index 95c67b321..7bac85797 100644 --- a/comfy_extras/mediapipe/face_landmarker.py +++ b/comfy_extras/mediapipe/face_landmarker.py @@ -556,14 +556,7 @@ def _blazeface_input_warp(image_chw_raw: Tensor, target: int = _BF_INPUT_SIZE) - class FaceLandmarker(nn.Module): - """BlazeFace → FaceMesh v2 → blendshapes. `detector_variant` selects 'short' - (128², ≤2m), 'full' (192² FPN, ≤5m), or 'both' — which holds both detectors - alongside shared mesh/blendshapes so detect_batch can run them and per-frame - keep whichever found more faces (tie → short). State dict uses inner-module - prefixes `detector.*` (short or single-variant), `detector_full.*` (only - under 'both'), `mesh.*`, `blendshapes.*`; the outer FaceLandmarkerModel - wrapper rewrites `detector_{variant}.*` keys to `detector.*` before loading. - """ + """BlazeFace → FaceMesh v2 → blendshapes.""" def __init__(self, device=None, dtype=None, operations=None, detector_variant: str = "short"): super().__init__() @@ -589,7 +582,7 @@ class FaceLandmarker(nn.Module): variant: Optional[str] = None): """Batched detector pass. Returns (img_raws, sub_rects, sizes, per_frame_decoded) where per_frame_decoded[b] is (N, 17) in tensor-normalized [0,1] coords. - `variant` overrides per-call (required on 'both'-mode instances).""" + `variant` overrides per-call.""" if not images_rgb_uint8: return [], [], [], [] if variant is None: