ONNX Detection Model Loader:
OnnxDetectionModelLoader prepares two ONNX-based models for a pose-detection workflow: ViTPose for estimating body pose and YOLO for detection. It loads the selected model files and makes the resulting model pair available together, so you can pass them to compatible preprocessing nodes rather than setting up each model separately. This node prepares models; it does not produce a pose image or detection results by itself.
ONNX Detection Model Loader Input Parameters:
vitpose_model
Select the ViTPose model file to load for pose estimation. The choices come from the files ComfyUI lists in ComfyUI/models/detection. Your selection determines which ViTPose model is prepared, so choose a file intended for ViTPose rather than an unrelated detection model. There is no numeric minimum or maximum, and the source does not specify a default selection; the available options depend on the files in your detection-model folder.
yolo_model
Select the YOLO model file to load for detection. Like vitpose_model, its choices are drawn from ComfyUI/models/detection. This selection determines which YOLO model is paired with ViTPose; selecting a file for a different model type may prevent loading. There is no numeric minimum or maximum, and no default selection is specified in the source. The available options depend on the files in your detection-model folder.
onnx_device
Choose where the ONNX models run. The options are CUDAExecutionProvider and CPUExecutionProvider; the default is CUDAExecutionProvider. CUDA is the option for a compatible NVIDIA GPU setup and can be useful when you want GPU-backed inference, while CPU is an alternative when CUDA is unavailable. The same choice is passed to both models. This is a two-option selector, so numeric minimum and maximum values do not apply.
ONNX Detection Model Loader Output Parameters:
model
A POSEMODEL value containing the two loaded model objects, stored under the keys vitpose and yolo. Pass this output to a compatible node that accepts POSEMODEL to use the prepared pose-estimation and detection models. It represents the models themselves, not an image, a pose result, or a list of detections.
ONNX Detection Model Loader Usage Tips:
- Place the intended ViTPose and YOLO model files in
ComfyUI/models/detection, then select the corresponding file in each dropdown. Both dropdowns draw from the same folder, so check that you have not selected the two files in the wrong positions. - Keep
CUDAExecutionProviderselected when you have a working CUDA-capable setup and want to run the ONNX models there. Switch toCPUExecutionProviderif CUDA is not available or the models fail to initialize with the CUDA provider. - Connect
modelto a downstream node that acceptsPOSEMODEL. Add a compatible processing node if you need actual pose or detection results.
ONNX Detection Model Loader Common Errors and Solutions:
Model file is missing or cannot be found
- Explanation: The node resolves each selected filename through ComfyUI’s
detectionmodel directory. If a selected file is no longer there, path lookup can fail before either model is loaded. The exact error text depends on ComfyUI’s path handling. - Solution: Check that both selected files still exist in
ComfyUI/models/detection, then refresh the model list or restart ComfyUI and select them again.
No models appear in the dropdown
- Explanation: Both model selectors use ComfyUI’s list of files in the
detectionmodel directory. If the expected files are absent or not being listed, you cannot select them. - Solution: Put the appropriate model files in
ComfyUI/models/detectionand refresh or restart ComfyUI. Check that ComfyUI can see the files in that directory.
CUDA execution provider is unavailable
- Explanation:
CUDAExecutionProvideris the default and is passed to both ONNX model constructors. If your ONNX environment cannot use CUDA, model initialization may fail; the exact message depends on the underlying implementation. - Solution: Select
CPUExecutionProviderand try again. If you need GPU execution, check that your NVIDIA driver and ONNX GPU environment support CUDA execution.
Model fails to load or initialize
- Explanation: The selected path is passed directly to either the ViTPose or YOLO loader. An incompatible, damaged, or incorrectly assigned model file may cause that loader to fail. The exact error message is determined by the model implementation.
- Solution: Verify that
vitpose_modelpoints to a ViTPose model andyolo_modelpoints to a YOLO model. Replace any suspect file with a valid model file and retry.
