Nodes/ComfyUI-CustomNodeKit/Resample SDPose Keypoints
ComfyUI Node

Resample SDPose Keypoints

Resample pose keypoints

By user2318·Created 4 months ago·Updated about a month ago· 56
Resample SDPose Keypoints
  • pose_keypoints
  • pose_keypoints
  • fps
input_fps0
output_fps0
interp_methodinterpolate
fix_empty_framesfalse

Load SDPose JSON resamples on the way in, but only when the file carries an fps header. Resample SDPose Keypoints is the version that works on any pose stream, anywhere in the graph, with no JSON involved. You load your keypoints at native capture speed, decide the driving video for WanAnimate runs at a different frame rate, and this node resamples the keypoint sequence to match - downsample to drop frames, upsample to synthesize them.

Under the hood it's a simple ratio: input_fps / output_fps greater than 1 means downsampling (frame dropping), less than 1 means upsampling. For upsampling you choose the interpolation method - interpolate linearly blends between neighboring keypoint positions for smooth motion, duplicate copies the nearest frame. The latter is cheaper and avoids the slightly rubbery in-between poses linear interpolation can produce on fast movements; for slow, stable motion the interpolated result is usually nicer.

Inputs and outputs

  • pose_keypoints - the POSE_KEYPOINT stream (required).
  • input_fps - the sequence's original frame rate. 0 means unknown, in which case nothing happens (it passes through untouched).
  • output_fps - the target. 0 also means no processing. Both need to be positive for work to happen.
  • interp_method - interpolate or duplicate, only for the upsampling direction.
  • fix_empty_frames (optional, off by default) - same repair logic as the Load node: detects frames with empty people lists and fills them from valid neighbors. Handy here because resampling a bad frame can otherwise multiply the damage.

Outputs are the resampled pose_keypoints and an fps float (your output_fps when resampling happened, 0 otherwise). Chain it after Load SDPose JSON or any other pose source.

When to reach for it

The classic scenario: your source video was 30 or 60fps, your WanAnimate generation runs at 16fps, and you want the pose drive rate to match so the animation timing doesn't drift. It's also useful in the pack's 360° preprocessing where you assemble reference-angle pose batches at a uniform frame count. It's a dumb, honest utility - no models, no magic, just clean resampling on data you already paid to detect.

Install

Part of ComfyUI-CustomNodeKit. Via Manager (search "ComfyUI-CustomNodeKit") or:

cd ComfyUI/custom_nodes
git clone https://github.com/user2318/ComfyUI-CustomNodeKit.git
cd ComfyUI-CustomNodeKit
pip install -r requirements.txt

Restart ComfyUI after installing. Nothing extra to download for this one.

CategorySDPose

Inputs (5)

NameTypeDefaultDescription
pose_keypointsPOSE_KEYPOINT
input_fpsFLOAT00–120输入关键点的原始帧率:0=未知(不处理);>0 时根据 ratio = input_fps / output_fps 进行抽帧/补帧。Input keypoint original FPS: 0=unknown (no processing); >0=downsample/upsample based on ratio = input_fps / output_fps.
output_fpsFLOAT00–120目标输出帧率:0=不处理;>0 时对输入进行重采样。Target output FPS: 0=no processing; >0=resample input to this FPS.
interp_methodCOMBOinterpolate仅升帧(补帧)时有效:interpolate=线性插值,duplicate=复制最近帧。Only effective for upsampling: interpolate=linear interpolation, duplicate=copy nearest frame.
fix_empty_framesoptBOOLEANfalse启用后,自动检测并修复 people 为空的帧,用前后有效帧插值填充,消除黑帧。When enabled, auto-detects and fixes empty frames by interpolating from valid neighboring frames, eliminating black frames.

Outputs (2)

NameTypeDescription
pose_keypointsPOSE_KEYPOINT
fpsFLOAT