Nodes/ComfyUI_DWposeDeluxe/DWpose Keypoint Diff
ComfyUI Node

DWpose Keypoint Diff

Did that conversion break your pose data? This node tells you.

By hobinrude·Created 11 months ago·Updated 10 months ago· 12
DWpose Keypoint Diff
  • keypoints_1
  • keypoints_2
  • diff_info
◄coordinate_threshold0.05►
◄confidence_threshold0.01►

Pose keypoint data gets shuffled around a lot in this pack - converted between absolute and normalized coordinates, cleaned, reversed, re-batched. Most of the time nothing breaks. When something does break, you want to know before it silently ruins a whole video render. This node compares two POSE_KEYPOINT datasets and tells you exactly what differs, down to which frame, which person, and which body part.

It's a verification tool, not a transformer. You feed it two datasets of the same length and it walks through every (x, y, confidence) triplet in every frame, comparing keypoints_1 (the baseline) against keypoints_2. That's the whole job.

The inputs

  • keypoints_1 - your baseline dataset.
  • keypoints_2 - the dataset you're checking against it.
  • coordinate_threshold (default 0.05) - how much coordinate drift counts as a mismatch. Because it auto-detects whether your data is absolute (pixel) or normalized (0–1), it scales the threshold appropriately; 0.05 means 5% of the canvas in normalized space.
  • confidence_threshold (default 0.01) - how much confidence-value drift counts as a mismatch.

Tiny rounding differences under 0.0001 are ignored automatically, so you don't get false alarms from float noise after a round-trip conversion.

What it tells you

The single output, diff_info, is a STRING report with the frame count of both batches and a line-by-line list of mismatches: frame count differences, people-count mismatches per frame, point-count mismatches per subset, and per-keypoint coordinate/confidence deltas. Wire it into a text display node to read it, or just watch the console - it logs a clean info line for a perfect match and a warning if anything disagrees.

The canonical use case is after a round-trip: convert absolute → normalized → absolute, or run your keypoints through ReverseKeypoints twice, then diff the result against the original. If diff_info is clean, your pipeline didn't corrupt anything. If it's not, you now know exactly where.

There's one gotcha to respect: the comparison is structural and positional. Two datasets with the same frame count but people detected in a different order will flag as "different" even if the poses are identical - the node compares person index to person index, not by matching identities. So use it on data from the same detection run, not as a general "are these the same person" tool.

Installing it

Part of the DWposeDeluxe pack:

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

or search DWposeDeluxe in ComfyUI Manager. No models, no inference - pure number crunching, so it runs instantly even on huge batches. And since this is a young pack, if you're diffing data that came from another node pack, be aware that its JSON structure may not match what this pack expects; if the report looks like garbage, that's usually why.

CategoryDWposeDeluxe

Inputs (4)

NameTypeDefaultDescription
keypoints_1POSE_KEYPOINT—
keypoints_2POSE_KEYPOINT—
coordinate_thresholdFLOAT0.050–1—
confidence_thresholdFLOAT0.010–1—

Outputs (1)

NameTypeDescription
diff_infoSTRING—