PMA Eye Stabilizer
Fix the creepy eye glitching in your Wan2.2 motion transfer — a real fix, not a placeholder
- images
- stabilized_images
- eye_mask
- debug_visualization
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_visualizationoverlays 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_strengthnear 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.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| enable_temporal_smoothing | BOOLEAN | true | — |
| enable_blink_detection | BOOLEAN | true | — |
| enable_eye_enhancement | BOOLEAN | true | — |
| smoothing_strength | FLOAT | 0.700–1 | Higher = more smoothing (less responsive) |
| enhancement_strength | FLOAT | 1.31–2 | Eye sharpening strength |
| blink_threshold | FLOAT | 0.200.1–0.5 | Sensitivity for blink detection |
| eye_region_dilationopt | INT | 100–50 | Pixels to expand eye mask region |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| stabilized_images | IMAGE | — |
| eye_mask | MASK | — |
| debug_visualization | IMAGE | — |