ComfyUI Node Runs on cloud

AnimalPose Estimator (AP10K)

OpenPose, but for animals

By Fannovel16·Created 3 years ago·Updated 4 months ago· 4,132
AnimalPose Estimator (AP10K)
  • image
  • IMAGE
  • POSE_KEYPOINT
bbox_detectoryolox_l.torchscript.pt
pose_estimatorrtmpose-m_ap10k_256_bs5.torchscript.pt
resolution512

Human OpenPose won't help you pose a dog - its skeleton is built for two arms and two legs. AnimalPose is the four-legged answer: it detects animals and estimates their pose using the AP10K keypoint scheme (17 keypoints designed for quadrupeds), drawing a skeleton you feed to the animal-pose ControlNet. Want to generate a cat in a specific crouch, or match a horse's gait from a reference? This is the preprocessor that captures the pose so the ControlNet can rebuild the animal in it. It's a niche tool, but for animal work it's the right and only one in this pack.

How it works

Like DWPose, AnimalPose runs a two-stage pipeline: a bounding-box detector finds the animals in the frame, then a pose estimator (RTMPose trained on the AP10K animal dataset) places the 17 keypoints on each one. The result is a skeleton tuned for animal anatomy - spine, legs, head - rather than the human joint layout. Feed it to the animal-openpose ControlNet (control_sd15_animal_openpose) and the model generates an animal matching that pose, free to change species-appropriate details, breed, color, and setting.

The inputs that matter - and a speed decision

Two of the three options are model pickers, and they hide an important performance choice:

  • bbox_detector (default yolox_l.torchscript.pt) - the animal detector. The choice between the .torchscript.pt and .onnx endings isn't cosmetic: it decides your backend. The README is explicit that pose estimators here can fall back to slow CPU, and the fix for speed is TorchScript or ONNX checkpoints. TorchScript works out of the box and is way faster than CPU; ONNX can be faster still but needs a matching onnxruntime-gpu install (and, on NVIDIA, is fussy about CUDA versions).
  • pose_estimator (default rtmpose-m_ap10k_256_bs5.torchscript.pt) - the keypoint model, same TorchScript-vs-ONNX tradeoff. A TorchScript detector pairs fine with an ONNX estimator and vice versa.
  • resolution (default 512) - working size; match your render.

There are two outputs: an IMAGE (the rendered animal skeleton) for your ControlNet Apply node, and a POSE_KEYPOINT - the pose as structured data (AP10K-format JSON, a cousin of OpenPose JSON) that you can save or route into an editor. The node makes the skeleton; the animal-pose ControlNet model is a separate download.

Installing it

ComfyUI Manager: search ComfyUI's ControlNet Auxiliary Preprocessors, install, restart. Or:

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

Restart ComfyUI. The detector and estimator weights download from HuggingFace on first run. If you want the ONNX GPU path, you'll also need to install onnxruntime-gpu yourself (see the pack README's DWPose/AnimalPose speed section - the exact package depends on your CUDA version).

Where people get burned

First, the speed trap: if AnimalPose is crawling, it's almost certainly running pose estimation on CPU. Stick to the default TorchScript checkpoints (the .torchscript.pt ones) for a big speedup with no extra setup, and only bother with ONNX if you've installed the right onnxruntime-gpu build - the README warns ONNX on NVIDIA currently wants CUDA 11.8 unless you compile it yourself. Second, detection depends on a clear subject: a well-framed animal detects cleanly, an oddly-posed or partially-hidden one gives a broken skeleton and thus a broken generation. Third - the constant - no animal-pose ControlNet loaded means the skeleton does nothing; and note it's an SD1.5-era ControlNet, so this lives in an SD1.5 workflow. Finally, don't try to pose a human with it or an animal with human OpenPose; the keypoint schemes are different and mismatching them produces nonsense.

CategoryControlNet Preprocessors/Faces and Poses Estimators

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
bbox_detectoroptCOMBOyolox_l.torchscript.pt6 options: None, yolox_l.torchscript.pt, yolox_l.onnx, yolo_nas_l_fp16.onnx, yolo_nas_m_fp16.onnx, yolo_nas_s_fp16.onnx
pose_estimatoroptCOMBOrtmpose-m_ap10k_256_bs5.torchscript.pt2 options: rtmpose-m_ap10k_256_bs5.torchscript.pt, rtmpose-m_ap10k_256.onnx
resolutionoptINT51264–16384

Outputs (2)

NameTypeDescription
IMAGEIMAGE
POSE_KEYPOINTPOSE_KEYPOINT