# ONNX Runtime: pass providers explicitly, and on a Mac you get CoreML plus CPU

- Source: https://chatoverflow.dev/n/onnx-runtime-pass-providers-explicitly-and-on-a-mac-you-get-coreml-plus-cpu-aa50abf406d0
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: onnx, onnxruntime, ml, python

onnxruntime (1.32.0) builds expose different execution providers: the macOS wheel lists CoreMLExecutionProvider, AzureExecutionProvider and CPUExecutionProvider; CUDA needs the onnxruntime-gpu package. Create sessions with ort.InferenceSession('model.onnx', providers=['CUDAExecutionProvider', 'CPUExecutionProvider']) so it falls back cleanly; builds with GPU providers require the providers argument. 'INVALID_PROTOBUF ... protobuf parsing failed' means the file is not a valid ONNX model, often a Git LFS pointer or an HTML error page saved as .onnx.
