Nodes/ComfyUI-CustomNodeKit/Load SDPose JSON
ComfyUI Node

Load SDPose JSON

Load an SDPose JSON back into the graph

By user2318·Created 4 months ago·Updated about a month ago· 56
Load SDPose JSON
    • pose_keypoints
    • frame_count
    • canvas_width
    • canvas_height
    • effective_fps
    json_path
    target_fps0
    interp_methodinterpolate
    fix_empty_framesfalse

    Pose detection is expensive. If you're running the pack's long-video pose workflows, you detect a whole clip once, save the keypoints to JSON, and then iterate on drawing, yaw estimation, or animation without re-running detection. Load SDPose JSON is the front door back in: it reads that JSON and hands you a POSE_KEYPOINT stream the rest of the SDPose chain understands.

    It handles both storage formats the companion Save node produces - a raw array of frames, or the newer {"fps": ..., "frames": [...]} wrapper - so old and new exports both load fine. Each frame carries canvas_width, canvas_height and a people list, and those become the canvas dimensions you'll need downstream for drawing and resizing.

    The inputs that matter

    • json_path - the file path. That's the only required one.
    • target_fps (default 0) - 0 reads every frame as-is; any positive number resamples to that frame rate, using the FPS stored in the JSON header. This is how you load a 30fps capture and drive a 16fps WanAnimate generation without a separate resample node.
    • interp_method (interpolate/duplicate) - only used when upsampling. Interpolate linearly creates smoother motion; duplicate just copies the nearest frame, which is faster and avoids mushy keypoints on fast moves.
    • fix_empty_frames (default off) - detects frames where people is empty or all coordinates are zero (the classic black-frame failure when detection drops a person) and fills them by interpolating from valid neighbors. If one side is missing it copies the nearer valid frame. This is worth enabling whenever your source footage is less than perfect, and it's practically required if you plan to feed Estimate Yaw, because an empty frame reads as a wild angle spike.

    Outputs

    You get pose_keypoints (the POSE_KEYPOINT), frame_count, canvas_width, canvas_height, and effective_fps. The last is a float: your target_fps if you resampled, the JSON's stored fps otherwise, or 0 if the file had no header.

    Common issues

    The node raises if the file doesn't exist, and each frame must have canvas dimensions and a people key - a hand-crafted or corrupted JSON will throw a clear error rather than silently misbehave. One subtle gotcha: resampling only kicks in when the JSON actually contains a stored fps. A bare-array export (saved with fps=0 in the Save node) has no header, so target_fps alone won't trigger resampling - use the dedicated Resample SDPose Keypoints node for that case.

    Install

    Part of the ComfyUI-CustomNodeKit pack. ComfyUI 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. Pure JSON parsing here - no extra models, no downloads.

    CategorySDPose

    Inputs (4)

    NameTypeDefaultDescription
    json_pathSTRING
    target_fpsoptFLOAT00–120目标帧率:0=全部读取;>0 时根据 JSON 中的 fps 自动抽帧/补帧。Target FPS: 0=read all; >0=auto sample/upsample based on JSON fps.
    interp_methodoptCOMBOinterpolate仅升帧(补帧)时有效: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 (5)

    NameTypeDescription
    pose_keypointsPOSE_KEYPOINT
    frame_countINT
    canvas_widthINT
    canvas_heightINT
    effective_fpsFLOAT