Pose Anchor & Fit (Enigmatic)
Keep retargeted skeletons on canvas and feet on the floor
- pose_data
- pose_data
Retargeting a pose onto a new performer is a two-thirds-done job. The motion comes across, sure - but the skeleton drifts off the canvas edge, or the feet float six inches above where they should be, and every generated frame inherits the problem. Pose Anchor & Fit is a small post-processing pass that fixes exactly that: it scales the retargeted skeleton so it fits inside the canvas with a margin, then anchors the feet to the source performer's foot position, per frame. The author's own description tells you where it goes: "Insert between PoseAndFaceDetection and DrawViTPose."
It's one node in Enigmatic Nodes, a small utility pack by the individual dev enigmatice. No models, no downloads - it's pure geometry on pose data.
How it works
It reads the POSEDATA object, which carries both the retargeted skeleton (pose_metas) and the original source skeleton (pose_metas_original). For each frame it does three things:
- Fit. It computes the skeleton's bounding box using only keypoints above a confidence threshold, then scales it so the box fits inside the canvas minus a
canvas_marginon each side - capped bymax_scale. At the defaultmax_scaleof1.0, that means shrink-only: it never enlarges a skeleton to fill the canvas. - Anchor. It finds the feet (ankles and toes) of the retargeted skeleton, then shifts the whole thing so those feet land on the source performer's normalized foot position from the original data - the X from the mean of the ankles, the Y from the lowest foot. This is what keeps the character standing where the source performer stood.
- Fallback. If a frame's source feet aren't detected (below
confidence_threshold), it reuses the first valid frame's anchor position whenfallback_to_first_valid_frameis on, so you don't get a random jump in the middle of the clip.
The scale pivot is the feet, not the center - which is the right choice, because it means scaling makes the character grow or shrink toward the floor rather than floating. That's the detail that separates this from a naive "fit to canvas" node.
The inputs that matter
- pose_data - the
POSEDATAfrom your retargeting chain. It needs both the retargeted and original metas to do anything. - canvas_margin (default
20) - pixels of breathing room between the skeleton and the canvas edge. - max_scale (default
1.0) - the scale ceiling.1.0= shrink only; raise it if you want to allow enlarging small skeletons. - anchor_x / anchor_y (both on) - which axes to anchor to the source feet.
- confidence_threshold (default
0.3) - keypoints below this are ignored when computing boxes and anchors.
The output
One pose_data back out, with the retargeted metas re-fit and re-anchored. Feed it to DrawViTPose and the drawn skeleton stays on canvas and on the ground.
Installing it
Same for every node in the pack:
- ComfyUI Manager - search Enigmatic Nodes, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/enigmatice/comfyui-enigmatic-nodes, then restart.
No model files. The pack declares torch, numpy, scipy, Pillow, opencv-python; ComfyUI core already ships all but opencv-python (which you almost certainly have from another pack), and Manager installs deps.
Common issues
- Nothing happens. The most likely cause: your
pose_datahas nopose_metas_originalbecause the source reference image wasn't wired into the retarget node. The code checks for this and passes the data through with a warning in the console. Also make sure the retargeted and original frame counts match - if they don't, it bails out rather than guess. - Skeletons come out too small. That's
max_scaleat1.0doing its shrink-only job. If the retargeted pose is smaller than the canvas, raisemax_scaleto let it fill. - Feet float anyway. If
confidence_thresholdis too high, the feet keypoints get discarded and there's nothing to anchor to. Lower it, or check that the source footage actually has visible feet. - It's not in the README. True - this node (like
Match Image Batch Size) shipped in the code before the pack's README caught up. It's real and registered; the docs are just behind.
It's a young pack with zero community footprint yet, so the niche work of pose-retargeting post-processing is largely yours to figure out. But the mechanism is sound, the defaults are sane, and for a very specific failure - skeletons drifting off-canvas - it's the right medicine.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| pose_data | POSEDATA | — | |
| canvas_margin | INT | 200–500 | Pixels of margin between the skeleton bounding box and the canvas edge. |
| max_scale | FLOAT | 1.000.1–3 | Upper limit on the scale factor. 1.0 = shrink-only (never enlarge). Raise to allow enlargement. |
| anchor_x | BOOLEAN | true | Anchor feet X to the source performer's feet X, per frame. |
| anchor_y | BOOLEAN | true | Anchor feet Y to the source performer's feet Y, per frame. |
| confidence_threshold | FLOAT | 0.300–1 | Keypoints below this confidence are ignored when computing bboxes and anchors. |
| fallback_to_first_valid_frame | BOOLEAN | true | If a frame's source feet aren't detected, reuse the first valid frame's anchor position. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pose_data | POSEDATA | — |