Skip to content

ONNXRuntimeError #2

@flsabourin

Description

@flsabourin

Immich ML application is starting correctly, with a fresh cache folder, however, as soon as Immich Server triggers the ML engine, I get an error

at the beginning of the execution:

`(.venv) ➜ machine-learning git:(main) ✗ python -m immich_ml
[10/18/25 22:21:15] INFO Starting gunicorn 23.0.0
[10/18/25 22:21:15] INFO Listening at: http://[::]:3004 (43082)
[10/18/25 22:21:15] INFO Using worker: immich_ml.config.CustomUvicornWorker
[10/18/25 22:21:15] INFO Booting worker with pid: 43083

[10/18/25 22:21:16] INFO Started server process [43083]
[10/18/25 22:21:16] INFO Waiting for application startup.
[10/18/25 22:21:16] INFO Created in-memory cache with unloading after 300s of inactivity.
[10/18/25 22:21:16] INFO Initialized request thread pool with 10 threads.
[10/18/25 22:21:16] INFO Application startup complete.
[10/18/25 22:21:35] INFO Downloading detection model 'buffalo_l'. This may take a while.
README.md: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 582/582 [00:00<00:00, 3.40MB/s]
.gitattributes: 2.33kB [00:00, 22.2MB/s] | 0.00/582 [00:00<?, ?B/s]
detection/model.onnx: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16.9M/16.9M [00:01<00:00, 14.7MB/s]
recognition/model.onnx: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 174M/174M [00:01<00:00, 128MB/s]
Fetching 4 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:01<00:00, 2.33it/s]
[10/18/25 22:21:37] INFO Loading detection model 'buffalo_l' to memory
[10/18/25 22:21:37] INFO Setting execution providers to ['CoreMLExecutionProvider', 'CPUExecutionProvider'], in descending order of preference
2025-10-18 22:21:37.661521 [W:onnxruntime:, coreml_execution_provider.cc:113 GetCapability] CoreMLExecutionProvider::GetCapability, number of partitions supported by CoreML: 4 number of nodes in the graph: 153 number of nodes supported by CoreML: 132
[10/18/25 22:21:38] INFO Loading recognition model 'buffalo_l' to memory
[10/18/25 22:21:38] INFO Setting execution providers to ['CoreMLExecutionProvider', 'CPUExecutionProvider'], in descending order of preference
2025-10-18 22:21:38.328678 [W:onnxruntime:, helper.cc:83 IsInputSupported] CoreML does not support input dim > 16384. Input:681, shape: {-1,25088}
[10/18/25 22:21:39] INFO Setting execution providers to ['CoreMLExecutionProvider', 'CPUExecutionProvider'], in descending order of preference
2025-10-18 22:21:39.436192 [W:onnxruntime:, helper.cc:83 IsInputSupported] CoreML does not support input dim > 16384. Input:681, shape: {-1,25088}`

and at the end of the execution trace

Fail: [ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running 11938055035134306363_CoreML_11938055035134306363_0 node. Name:'CoreMLExecutionProvider_11938055035134306363_CoreML_11938055035134306363_0_0' Status Message: Error executing model: Unable to compute the prediction using a neural network model. It can be an invalid input data or broken/unsupported model (error code: -1).

I am running on an Mac mini M4, Sequoia 15.6.1

Any clue how to fix this?

ps: I changed port to 3004 not to mess up with my ML in Docker, using port 3003 (but stopped at the time of execution)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions