Magos DWP Extractor
Magos DWP Extractor
- images
- keyframe_data
- pose_data
- face_images
- bboxes
- facebboxes
- nlf_model
Every pose-driven WanAnimate workflow starts with the same step: turn video frames into a skeleton. That's the Magos DWP Extractor's whole job. Feed it an image batch, it runs YOLO person detection + ViTPose keypoint estimation (the same ONNX models Kijai's WanAnimatePreprocess uses), and out comes a POSEDATA skeleton you can hand to a renderer or retargeter - or, more interestingly, KEYFRAME_DATA you can open in the pack's Magos DWP Editor and fix by hand.
It's the entry point of the ComfyUI-Magos-Nodes pack, the first node in its extract → edit → render chain. It does the same detection job as WanAnimatePreprocess's own preprocess node, but its output is built for editing: every detected frame gets baked into the keyframe data, so when you open the Editor, the whole timeline shows up ready to adjust.
How it works
images in, skeleton out. The dropdowns for vitpose_model and yolo_model are populated from whatever ONNX detection models ComfyUI knows about (the detection folder, i.e. ComfyUI/models/detection/) - the standard DWPose models from WanAnimatePreprocess's setup. Detection runs per frame via the ONNX runtime on your onnx_device of choice (CUDA by default, CPU if you're on a machine without it or hitting OOM).
The settings that actually matter:
detect_hands,detect_face,detect_head- all on by default. Turn off face detection and you shave compute, at the cost of no face landmarks for WanAnimate's face conditioning.confidence_threshold(0.3) - minimum keypoint confidence to keep.person_index- which detected person's skeleton to track (0 is the first detected). Bump it if YOLO picks up the wrong body in a multi-person frame.output_width/output_height- rescale the skeleton coordinates to a target canvas; 0 means "use source."nlf_model- optional NLF 3D model fromComfyUI/models/nlf/(requires the ComfyUI-SCAIL-Pose pack). Select(None)to skip 3D entirely; you don't need it for basic pose work.
Outputs: keyframe_data (feed this into the Editor), pose_data (POSEDATA, for the Renderer or Retargeter directly), face_images (pixel crops of the face region - handy for IP-Adapter face conditioning), bboxes and facebboxes (standard BBOX format, compatible with SAM2-style segmentation), and nlf_model (the loaded NLF pipeline, if any).
Install
It's in the ComfyUI-Magos-Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/MagosDigitalStudio/ComfyUI-Magos-Nodes
Restart ComfyUI, and it appears under MAGOS Nodes → Temporal Editor. The dependency you can't skip: Kijai's ComfyUI-WanAnimatePreprocess must be installed - it registers the detection model folder and provides the ViTPose/YOLO wrappers this node imports. Without it, this node can fail to even show up in the menu (more below).
Common issues
- Node missing from the Add Node menu. This is the known one. The Extractor looks up a
detectionfolder in ComfyUI's folder_paths at load time, and if that folder isn't registered - typically because WanAnimatePreprocess didn't load - the node doesn't register. Fix: install/update ComfyUI-WanAnimatePreprocess (it registers the folder) and restart. One user in the pack's launch thread solved it by making sure thedetectiondirectory existed and was registered; the real fix is having WanAnimatePreprocess working. - Empty model dropdowns - no YOLO/ViTPose ONNX files in
ComfyUI/models/detection/. Grab the DWPose models (via WanAnimatePreprocess's setup, which downloads them) and re-launch. - Skeleton disappears on some frames - if no person is detected, the node carries forward the last valid detection, so a flicker usually means detection dropped a frame and the carried skeleton is stale. Lower the confidence threshold or pick a different
person_index. - Slow on CPU - it's ONNX; if you're running the
CPUExecutionProvider, expect it to crawl on a long clip. Keepdetect_hands/detect_faceoff if you don't need them.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| vitpose_model | COMBO | ViTPose ONNX model from ComfyUI/models/detection | |
| yolo_model | COMBO | YOLO ONNX model from ComfyUI/models/detection | |
| nlf_model | COMBO | (None) | NLF .safetensors from ComfyUI/models/nlf/ for 3D depth. Requires ComfyUI-SCAIL-Pose. Select (None) to skip. |
| onnx_device | COMBO | CUDAExecutionProvider | Device to run the ONNX models on |
| detect_hands | BOOLEAN | true | — |
| detect_face | BOOLEAN | true | — |
| detect_head | BOOLEAN | true | — |
| confidence_threshold | FLOAT | 0.300–1 | — |
| person_index | INT | 00–9 | — |
| output_width | INT | 00–8192 | 0 = use source width |
| output_height | INT | 00–8192 | 0 = use source height |
| face_padding | INT | 200–200 | — |
| debug_log | BOOLEAN | false | Write full trace to CMD + logs/session_*.log |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| keyframe_data | KEYFRAME_DATA | — |
| pose_data | POSEDATA | — |
| face_images | IMAGE | — |
| bboxes | BBOX | — |
| facebboxes | BBOX | — |
| nlf_model | NLF_MODEL | — |