Nodes/COMFYUI-MODELINSTALLER/PMA Eye Stabilizer
ComfyUI Node

PMA Eye Stabilizer

Fix the creepy eye glitching in your Wan2.2 motion transfer — a real fix, not a placeholder

By Pis7i·Created 10 months ago·Updated 9 months ago· 0
PMA Eye Stabilizer
  • images
  • stabilized_images
  • eye_mask
  • debug_visualization
enable_temporal_smoothingtrue
enable_blink_detectiontrue
enable_eye_enhancementtrue
smoothing_strength0.70
enhancement_strength1.3
blink_threshold0.20
eye_region_dilation10

The problem this actually solves

If you've run video motion transfer on Wan 2.2 - the open video base most local workflows sit on - you've seen it: the face mostly tracks fine, then the eyes glitch, jitter, or blink at completely unnatural moments. It happens because the control maps that drive these workflows put only a couple of landmarks on each eye, process every frame in isolation, and feed those shaky signals into a model happy to turn a micro-twitch into a full blink. PMA Eye Stabilizer sits in the middle of that chain and tries to fix the eyes before the model ever sees them.

This is the pack's genuinely working utility - unlike its Character Swap pair, which are placeholders. If you landed here from a Wan2.2 motion-transfer workflow, this is the node to actually try.

Where it goes and how it works

Insert it between background removal and control-map generation:

Video → RMBG → [PMA Eye Stabilizer] → DWPose/Depth → WanVaceToVideo

It takes your video as an image batch (images) and processes frame by frame. Under the hood:

  • MediaPipe Face Mesh finds the face (478 landmarks, with iris refinement) and pulls out the eye outlines plus iris positions - way denser than the few DWPose points.
  • A 1D Kalman filter runs on each landmark coordinate across frames, so the tracked eye region stops jumping around frame to frame.
  • Eye Aspect Ratio (EAR) math detects blinks.
  • A mask is built over both eyes, dilated by eye_region_dilation (default 10px), and only that region gets sharpened - detail where you want it, without frying the whole frame.
  • debug_visualization overlays the landmarks and stamps a red BLINK label when it thinks a blink happened - the quickest way to confirm tracking actually works.

The inputs you'll actually touch

  • smoothing_strength (0–1, default 0.7) - per the tooltip, higher means more smoothing and less responsiveness. Start at 0.7; nudge up if eyes still wobble, drop it if motion turns mushy.
  • enhancement_strength (1–2, default 1.3) - eye sharpening. Past ~1.5 you start eating natural skin texture.
  • blink_threshold (0.1–0.5, default 0.2) - blink sensitivity. Lower = more eager to call something a blink.
  • The three toggles (enable_temporal_smoothing, enable_blink_detection, enable_eye_enhancement) let you isolate what's actually helping.

Outputs: stabilized_images (your processed frames), eye_mask (a MASK you can route into other mask-based tools), and debug_visualization - peek at it once to confirm the eyes are being found.

Install

The pack needs MediaPipe, and it's pinned:

cd ComfyUI/custom_nodes
git clone https://github.com/Pis7i/COMFYUI-MODELINSTALLER
pip install mediapipe==0.10.21

Or use ComfyUI Manager → search COMFYUI-MODELINSTALLER, which handles requirements.txt for you. Restart, and the console should print "[PMA Utils] Eye stabilizer node loaded."

Troubleshooting

  • No landmarks in the debug view - face not detected. The setup guide's first check is that the face is forward-facing; the node tracks a single face (max_num_faces=1).
  • Output looks like plain sharpening - you're in fallback mode because MediaPipe isn't installed; the node degrades to basic enhancement with no tracking at all. Install the pinned version.
  • Everything too smooth, eyes lag - that's smoothing_strength near 1.0; back it off.
  • It chews through the whole batch up front, so preview on a short clip before committing to a long render. A slow first run is normal - this is per-frame landmark tracking, not a free lunch.

One honest caveat: this is a frame-domain post-process - mask, sharpening, stabilized tracking - not a generative fix. For the "model blinks every few frames" flavor of the problem, the V2 sibling's blink-suppression mode is the better tool. For jittery, flickery eye regions, this one does the job.

CategoryPMA Utils/Video Processing

Inputs (8)

NameTypeDefaultDescription
imagesIMAGE
enable_temporal_smoothingBOOLEANtrue
enable_blink_detectionBOOLEANtrue
enable_eye_enhancementBOOLEANtrue
smoothing_strengthFLOAT0.700–1Higher = more smoothing (less responsive)
enhancement_strengthFLOAT1.31–2Eye sharpening strength
blink_thresholdFLOAT0.200.1–0.5Sensitivity for blink detection
eye_region_dilationoptINT100–50Pixels to expand eye mask region

Outputs (3)

NameTypeDescription
stabilized_imagesIMAGE
eye_maskMASK
debug_visualizationIMAGE