Face Tracker
Sequence awareness for Face Processor (with a caveat)
- image
- fp_pipe
- image
- fp_pipe
Here's the honest pitch: FaceTracker exists so Face Processor can work on image sequences instead of single frames. It takes a frame, detects the face, and files the landmarks away in fp_pipe under tracking_data, keyed by frame number. Run it frame after frame and you end up with a per-frame landmark record you can hand to the rest of the pack. That's genuinely useful for video-ish workflows - consistent face edits across a shot need the geometry from every frame, not just one.
The caveat comes from reading the source: despite the "optical flow" talk in the class docstring, the tracking here is mostly re-detection. Each call runs MediaPipe Face Mesh again on the current frame and stashes the result. use_motion_vectors and reset_points_interval appear in the input schema and the function signature, but at the version this repo ships they don't actually change the output - the optical-flow parameters are defined and then never used. It's an early-stage node. It works; it's just not doing what the name promises yet. Keep expectations in check and it's a fine per-frame landmark logger.
Inputs and outputs that matter
imageandfp_pipe- both required.fp_pipeshould come from earlier in your sequence (an ImageFeeder → FaceWrapper chain), because the node readscurrent_frameout of it to decide whichframe_Nkey it's filing under.proxy_scale(0.2–1.0) - downscales the frame before detection and rescales the landmarks back. The one knob you'll actually tune for speed on big frames.debug,show_detection,show_region,tracker_region_size- the debug quartet.show_regiondraws a box around each landmark;tracker_region_size(32–128) sets that box size. Turn these on while verifying alignment, then leave them off for real runs.use_motion_vectors,reset_points_interval- present, no visible effect in this version (see above).
Outputs are image (unchanged unless debug overlay is on) and fp_pipe with tracking_data populated.
Install and context
Same pack as everything else here - Manager search "Face Processor", or:
cd ComfyUI/custom_nodes
git clone https://github.com/SykkoAtHome/ComfyUI_FaceProcessor.git
restart, and let requirements.txt pull in mediapipe/dlib/pandas (CuPy only matters for the GPU warper in FaceWrapper, not this node). The MediaPipe landmarker model downloads itself on first detection, so nothing to fetch by hand.
Troubleshooting
- No face detected - the node prints it and returns the frame untouched. If your subject leaves frame or turns hard profile, the frame gets no entry; the code even has a TODO about filling NaNs and continuing, which tells you it's not handled yet.
- "Task runner is currently not running" - a known MediaPipe annoyance when the task gets closed between calls. This pack actually handles it: it detects that exact error, re-initializes the model, and retries. If you see it once, it's self-healing; if you see it every frame, restart ComfyUI.
- Sequences and
current_frame- because it keys offfp_pipe["current_frame"], make sure that value is advancing between calls (ImageFeeder and FaceFitAndRestore both manage it). Staticcurrent_framemeans every frame overwrites the sameframe_0entry and your "tracking data" has one row in it.
It's a thin node - you could argue it's not worth installing the pack for on its own. But it's the piece that makes the Fit → edit → Restore loop sequence-aware, and once the optical-flow plumbing actually lands it'll be the interesting one.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| fp_pipe | DICT | — | |
| debug | BOOLEAN | false | — |
| use_motion_vectors | BOOLEAN | false | — |
| reset_points_interval | INT | 103–50 | — |
| tracker_region_size | COMBO | 64 | 5 options: 32, 48, 64, 96, 128 |
| proxy_scale | FLOAT | 1.000.2–1 | — |
| show_detection | BOOLEAN | false | — |
| show_region | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| fp_pipe | DICT | — |