[BUG] machine-learning missing CUDAExecutionProvider #973

Closed
opened 2026-02-04 23:45:12 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @aschrafl on GitHub (Jun 20, 2023).

The bug

Version 1.62.0
my immich_machine_learning has troubles getting the typesense container to work properly (assumption, how do I debug that container directly, it has no logging set-up).
It's logs show an issue that it tries to utilize a CUDAExecutionProvider. Since this is a headless server it doesn't have a graphics card and must rely on CPUExecutionProvider only.

immich_machine_learning | INFO: Started server process [1]
immich_machine_learning | INFO: Waiting for application startup.
immich_machine_learning | Could not find image processor class in the image processor config or the model config. Loading based on pattern matching with the model's feature extractor configuration.
immich_machine_learning | /opt/venv/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:65: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'CPUExecutionProvider'
immich_machine_learning | warnings.warn(
immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
immich_machine_learning | model ignore: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/1k3d68.onnx landmark_3d_68
immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
immich_machine_learning | model ignore: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/2d106det.onnx landmark_2d_106
immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
immich_machine_learning | find model: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
immich_machine_learning | model ignore: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/genderage.onnx genderage
immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
immich_machine_learning | find model: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
immich_machine_learning | set det-size: (640, 640)
immich_machine_learning | INFO: Application startup complete.
immich_machine_learning | INFO: Uvicorn running on http://0.0.0.0:3003 (Press CTRL+C to quit)
immich_machine_learning | INFO: Shutting down
immich_machine_learning | INFO: Waiting for application shutdown.
immich_machine_learning | INFO: Application shutdown complete.
immich_machine_learning | INFO: Finished server process [1]

The OS that Immich Server is running on

Arch

Version of Immich Server

v1.62.0

Version of Immich Mobile App

1.62.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

services:
  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1
    env_file:
      - .env
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    ports:
      - 127.0.0.1:8107:8127
      - 127.0.0.1:8108:8108
    logging:
      driver: none
    volumes:
      - tsdata:/data
    restart: always

volumes:
  tsdata:

Your .env content

just a random API key

Reproduction steps

Running the Face recognition job in the admin panel

Additional information

No response

Originally created by @aschrafl on GitHub (Jun 20, 2023). ### The bug Version 1.62.0 my immich_machine_learning has troubles getting the typesense container to work properly (assumption, how do I debug that container directly, it has no logging set-up). It's logs show an issue that it tries to utilize a CUDAExecutionProvider. Since this is a headless server it doesn't have a graphics card and must rely on CPUExecutionProvider only. immich_machine_learning | INFO: Started server process [1] immich_machine_learning | INFO: Waiting for application startup. immich_machine_learning | Could not find image processor class in the image processor config or the model config. Loading based on pattern matching with the model's feature extractor configuration. immich_machine_learning | /opt/venv/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:65: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'CPUExecutionProvider' immich_machine_learning | warnings.warn( immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} immich_machine_learning | model ignore: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/1k3d68.onnx landmark_3d_68 immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} immich_machine_learning | model ignore: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/2d106det.onnx landmark_2d_106 immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} immich_machine_learning | find model: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} immich_machine_learning | model ignore: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/genderage.onnx genderage immich_machine_learning | Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} immich_machine_learning | find model: /cache/cpu/facial-recognition/buffalo_l/models/buffalo_l/w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 immich_machine_learning | set det-size: (640, 640) immich_machine_learning | INFO: Application startup complete. immich_machine_learning | INFO: Uvicorn running on http://0.0.0.0:3003 (Press CTRL+C to quit) immich_machine_learning | INFO: Shutting down immich_machine_learning | INFO: Waiting for application shutdown. immich_machine_learning | INFO: Application shutdown complete. immich_machine_learning | INFO: Finished server process [1] ### The OS that Immich Server is running on Arch ### Version of Immich Server v1.62.0 ### Version of Immich Mobile App 1.62.0 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML services: typesense: container_name: immich_typesense image: typesense/typesense:0.24.1 env_file: - .env environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data ports: - 127.0.0.1:8107:8127 - 127.0.0.1:8108:8108 logging: driver: none volumes: - tsdata:/data restart: always volumes: tsdata: ``` ### Your .env content ```Shell just a random API key ``` ### Reproduction steps ```bash Running the Face recognition job in the admin panel ``` ### Additional information _No response_
Author
Owner

@mertalev commented on GitHub (Jun 20, 2023):

You can safely ignore this warning. The facial recognition model we use tries to load in CUDA if available but falls back to CPU. This warning is because they pass the CUDA option even when it isn't available, but it just means it's ignored (if you notice, it says Applied providers: ['CPUExecutionProvider']).

@mertalev commented on GitHub (Jun 20, 2023): You can safely ignore this warning. The facial recognition model we use tries to load in CUDA if available but falls back to CPU. This warning is because they pass the CUDA option even when it isn't available, but it just means it's ignored (if you notice, it says `Applied providers: ['CPUExecutionProvider']`).
Author
Owner

@mertalev commented on GitHub (Jun 20, 2023):

But that being said, it is probably better if we pass the provider directly ourselves to avoid this warning.

@mertalev commented on GitHub (Jun 20, 2023): But that being said, it is probably better if we pass the provider directly ourselves to avoid this warning.
Author
Owner

@jrasm91 commented on GitHub (Jun 20, 2023):

What does this have to do with typesense?

@jrasm91 commented on GitHub (Jun 20, 2023): What does this have to do with typesense?
Author
Owner

@aschrafl commented on GitHub (Jun 21, 2023):

probably not related to typesense, my fault.

@aschrafl commented on GitHub (Jun 21, 2023): probably not related to typesense, my fault.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#973