Video MediaPipe Face Detection🎥AniPortrait
Turn Any Video Into a Face-Landmark Map (The Half of AniPortrait Everyone Skips)
- image
- pose_images
If you've stared at the AniPortrait self-driven workflow and wondered which node turns your reference clip into those wireframe skeleton frames, this is it. AniPortrait can't watch a video and animate directly - it animates from landmarks, a MediaPipe face-mesh map of where the eyes, brows, and mouth are on each frame. AniPortrait_Video_Gen_Pose (menu name "Video MediaPipe Face Detection🎥AniPortrait") is the step that produces that map from a batch of ordinary video frames.
What it actually does
You feed it a stack of frames - in the shipped workflow that's the frames output of VHS Load Video - and it runs MediaPipe's FaceLandmarker on every frame, then draws the detected face mesh as an image. The output is a pose video: a person-shaped skeleton of dots and lines showing exactly how the face moved in your source clip. That sequence of landmark frames is the "motion" your reference portrait will later perform.
The pack's own workflow names this the "pose2video" or self-driven mode: source video → this node → pose frames → AniPortrait_Pose_Gen_Video renders your reference image into that motion. It's the same philosophy as ControlNet-conditioned video: separate the motion from the appearance, then let the renderer paste the appearance onto the motion.
How it works
Each input frame is resized to your height/width, run through the bundled MediaPipe FaceLandmarker, and the landmark points are drawn onto a blank canvas via the pack's FaceMeshVisualizer. The good news: those .task model files ship inside the repo (src/utils/mp_models/), so there's no separate MediaPipe model download like you'd expect with other pose pipelines.
One honest quirk: the filename_prefix input is accepted but does nothing. It's vestigial from an older design - this node never saves a file, it returns pose frames for the next node. Don't hunt for the saved video in your output folder; that's what VHS Video Combine is for at the end of the graph.
The inputs that matter
- image (IMAGE) - the video frames. Feed it the
framesoutput ofVHS Load Video(orAniPortrait_LoadVideoPath). - height / width - both default 512. Keep them square: the README is blunt that non-square sources "will be weird." 512×512 is the safe zone for this SD 1.5-era stack.
Its single output, pose_images, plugs into the pose_images input of AniPortrait_Pose_Gen_Video. Frames where no face is detected silently reuse the previous frame's pose - which is why a clip that starts with the subject off-frame produces a few frozen skeleton frames at the front. Start the source video on a clear face.
Install
ComfyUI Manager is the easy path: search "ComfyUI_Aniportrait" and hit install, then restart. Manually, from ComfyUI/custom_nodes:
git clone https://github.com/frankchieng/ComfyUI_Aniportrait
cd ComfyUI_Aniportrait
pip install -r requirements.txt
The pose step itself only needs MediaPipe, which comes from requirements.txt (pinned to mediapipe==0.10.11). But the node upstream of this one - AniPortrait_Pose_Gen_Video - is the heavy one, so this install is really the whole-pack install. You'll be downloading Stable Diffusion 1.5, a VAE, the CLIP image encoder, and four AniPortrait weight files into a pretrained_model/ folder before any of it renders. See the Pose_Gen_Video article for the full file list.
Where it stands
This whole stack is 2024-era talking-head tech - the community's verdict at the time was "choppy but good for an initial release," and AniPortrait never beat EMO on pure lip-sync quality. Today's WanAnimate and LTX-2 pipelines have moved past it. But if you already have the models and want a cheap, fully-local self-driven portrait animation, this pose-extraction step works exactly as advertised, and it's the least complicated node in the pack.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| filename_prefix | STRING | AniPortrait | — |
| height | INT | 5120–1024 | — |
| width | INT | 5120–1024 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pose_images | IMAGE | — |