Nodes/ComfyUI-WanAnimatePreprocessV2/ONNX Detection Model Loader (V2)
ComfyUI Node

ONNX Detection Model Loader (V2)

No, the dropdown isn't broken — put the .onnx files in models/detection

By Code2Collapse·Created 8 months ago·Updated 8 days ago· 17
ONNX Detection Model Loader (V2)
    • model
    vitpose_model(place .onnx models in ComfyUI/models/detection)
    yolo_model(place .onnx models in ComfyUI/models/detection)
    onnx_deviceCUDAExecutionProvider

    This is the node you run into first, the moment you open this pack, and the reason most people bounce off it on day one. OnnxDetectionModelLoaderV2 loads the two ONNX models - a YOLO person detector and a ViTPose whole-body keypoint model - and hands them to the rest of the pipeline as one POSEMODEL bundle. Nothing else in the pack does anything until this node has both files. The good news: it's the whole difficulty. Everything downstream just consumes what it emits.

    The pack is a community continuation of Likhith-24's WanAnimate preprocessor, itself built on Kijai's ComfyUI-WanAnimatePreprocess with fixes from steven850 (GitHub issues #1410 and #10). It exists because Wan 2.2 Animate's own preprocessing is finicky - jittery skeletons, clipped face crops - and this version tries to do it properly. Apache-2.0, free, no API keys, no cloud calls.

    What you actually set

    The node has exactly three inputs and one output, which is why I'd argue it's the easiest node in the pack:

    • vitpose_model - dropdown of .onnx files in ComfyUI/models/detection/. Pick the whole-body model (that's the one with face + hands, not a body-only model).
    • yolo_model - dropdown for the YOLO detector (e.g. yolov10m.onnx). This is a person detector, not a pose model - don't swap your ViTPose file in here.
    • onnx_device - CUDAExecutionProvider (fast, needs onnxruntime-gpu) or CPUExecutionProvider (safe, slow).

    Output is a single model (POSEMODEL) that plugs into model on PoseAndFaceDetectionV2. That's the whole contract.

    One thing that trips people: the dropdowns show a placeholder saying "(place .onnx models in ComfyUI/models/detection)" and the pack deliberately lists .onnx files there even though ComfyUI normally hides them. If your dropdown looks empty, you haven't put the files where the node is looking.

    Models and install

    Grab the models first:

    cd ComfyUI/models/detection
    # YOLO person detector (from the Wan 2.2 Animate release)
    wget https://huggingface.co/Wan-AI/Wan2.2-Animate-14B/resolve/main/process_checkpoint/det/yolov10m.onnx
    # ViTPose wholebody - ViTPose-Large (~350MB) or ViTPose-Huge (~1GB)
    

    For ViTPose-Huge, note the gotcha: it ships split into vitpose_h_wholebody_model.onnx and vitpose_h_wholebody_data.bin, and both must sit in the same folder. You select the .onnx in the loader.

    Install the pack itself the usual way:

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

    ComfyUI Manager finds it if you search "WanAnimatePreprocessV2". One real-world warning: people have hit a "failed to find the following comfyregistry list" error when installing through the registry path, and the fix everyone lands on is a plain manual clone like above. If Manager's registry install throws that, just clone.

    Where people get burned

    • CUDA errors. If inference fails on CUDAExecutionProvider, your onnxruntime-gpu doesn't match your CUDA toolkit. Check with python -c "import onnxruntime; print(onnxruntime.get_available_providers())". The README suggests pip install onnxruntime-gpu==1.17.0 for CUDA 12.x. Or just flip onnx_device to CPU - slower, but it works everywhere and removes a whole class of pain while you debug.
    • Wrong ViTPose file. A body-only model will give you a skeleton with no face or hands, and the face-crop and iris stages downstream quietly degrade. Whole-body or nothing.
    • Models not appearing. Folder path is exactly ComfyUI/models/detection/ - not detection/onnx, not a subfolder.

    Runtime is the same story as the rest of the pack: CUDA gives you something like 20–30 FPS for detection on a 3080-class card; CPU drops you to 2–5. Fine for stills, miserable for a 1000-frame clip.

    CategoryWanAnimatePreprocess_V2

    Inputs (3)

    NameTypeDefaultDescription
    vitpose_modelCOMBO(place .onnx models in ComfyUI/models/detection)ViTPose ONNX file (human wholebody, e.g. vitpose_h_wholebody_model.onnx). Place in ComfyUI/models/detection/. .onnx is always listed here even if ComfyUI hides it elsewhere.
    yolo_modelCOMBO(place .onnx models in ComfyUI/models/detection)YOLO person-detector ONNX file (e.g. yolov10m.onnx — NOT a pose model). Place in ComfyUI/models/detection/. .onnx always listed.
    onnx_deviceCOMBOCUDAExecutionProviderExecution provider for ONNX Runtime. CUDA is much faster; CPU is the safe fallback.

    Outputs (1)

    NameTypeDescription
    modelPOSEMODELViTPose+YOLO model bundle. Connect to `model` on Pose and Face Detection (V2).