Estimate Yaw (Simple)
Which way is your character facing? A free yaw estimate from pose keypoints
- pose_keypoints_segment
- pose_keypoints_full
- yaw_array
- yaw_table
- yaw_json
Estimate Yaw (Simple) turns pose keypoints into a per-frame number: how many degrees the character is turned away from the camera. That number sounds boring until you realize it's the thing that makes multi-angle reference selection work. This pack's WanAnimate long-video workflows shoot a character from several angles, and when a dancing clip has them facing front, you want the front-view reference image driving that segment, not the back-view one. Yaw is the signal that picks it.
The clever part is that it's a pure keypoint heuristic - no head-pose model, no extra downloads, nothing to train. It reads shoulder and torso keypoints for the body scale, then uses nose and ear positions against that scale to estimate the angle, with a separate baseline for front versus back facing so a back view reads closer to 180° rather than collapsing to 0. Given how cheap that is, it's the right tool for the job: you don't need millimeter accuracy, you need to know whether a segment is mostly front or mostly profile.
The inputs that matter
- pose_keypoints_segment - the POSE_KEYPOINT stream from Load SDPose JSON or the SDPose detection chain. This is the required input.
- conf_threshold (default 0.3) - keypoints with confidence below this are ignored. Raise it if your detection is noisy and you see spikes; lower it if the pose is occluded and you're losing data.
- enable_smoothing (default on) - applies a 5-frame sliding window over the angles. Leave it on unless you want per-frame rawness; the smoothed output is what you feed downstream.
- pose_keypoints_full (optional) - the full sequence, passed in for continuity context when you're estimating on a segment.
Outputs are yaw_array (FLOAT, one angle per frame, in degrees), yaw_table (a debug string), and yaw_json (the same angles as a JSON array). Wire yaw_array into the pack's Reference Image Selector or straight into WanAnimateToVideoCustom's yaw_angles input.
Where people get burned
It's a heuristic, so it fails the same way all heuristics do: occlusion and missing keypoints create angle spikes, and smoothing only helps so much. If a frame has an empty people list (a detection failure), you'll get a jump - turn on fix_empty_frames in the upstream Load SDPose JSON or Resample node first. Also note the simple node caps angles around ±60°; the Advanced version in this pack exposes the full tuning if you need more.
Install
It ships in the ComfyUI-CustomNodeKit pack. Easiest via ComfyUI Manager - search "ComfyUI-CustomNodeKit". Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/user2318/ComfyUI-CustomNodeKit.git
cd ComfyUI-CustomNodeKit
pip install -r requirements.txt
Restart ComfyUI after. The pack pulls in opencv-python, mediapipe and imageio-ffmpeg alongside the usual torch/numpy/Pillow, and its install.py auto-installs groundingdino-py and transformers on startup if they're missing. No model files needed for this node itself - it only does math on keypoints you already have.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| pose_keypoints_segment | POSE_KEYPOINT | — | |
| conf_threshold | FLOAT | 0.300–1 | 关键点置信度阈值,提高可减少噪声但可能丢失有效数据。Keypoint confidence threshold; higher values reduce noise but may lose valid data. |
| enable_smoothing | BOOLEAN | true | 平滑开关,开启时对角度做时序平滑(5帧滑动窗口),关闭时跟随原始关键点更灵敏。Smoothing switch; when enabled, applies temporal smoothing (5-frame sliding window); when disabled, follows raw keypoints more responsively. |
| pose_keypoints_fullopt | POSE_KEYPOINT | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| yaw_array | FLOAT | — |
| yaw_table | STRING | — |
| yaw_json | STRING | — |