smart search fails to run #3488

Closed
opened 2026-02-05 08:40:59 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @lordkitsuna on GitHub (Jun 13, 2024).

The bug

enable ML smart search and dedupe, attempts to run, fails.

The OS that Immich Server is running on

arch linux

Version of Immich Server

1.106.3

Version of Immich Mobile App

1.106.1 build 142

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: '3.8'

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
#    command: ['start.sh', 'immich']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH}:/usr/src/app/external
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

#  immich-microservices:
#    container_name: immich_microservices
#    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
#    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
#    #   file: hwaccel.transcoding.yml
#    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
#    command: ['start.sh', 'microservices']
#    volumes:
#      - ${UPLOAD_LOCATION}:/usr/src/app/upload
#      - /etc/localtime:/etc/localtime:ro
#      - ${EXTERNAL_PATH}:/usr/src/app/external
#    env_file:
#      - .env
#    depends_on:
#      - redis
#      - database
#    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

###################################################################################
# Database
###################################################################################

# NOTE: The following four database variables support Docker secrets by adding a *_FILE suffix to the variable name
# See the docker-compose documentation on secrets for additional details: https://docs.docker.com/compose/compose-file/compose-file-v3/#secrets
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_PASSWORD=*****
DB_DATABASE_NAME=immich

# Optional Database settings:
# DB_PORT=5432

###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=immich_redis

# REDIS_URL will be used to pass custom options to ioredis.
# Example for Sentinel
# {"sentinels":[{"host":"redis-sentinel-node-0","port":26379},{"host":"redis-sentinel-node-1","port":26379},{"host":"redis-sentinel-node-2","port":26379}],"name":"redis-sentinel"}
# REDIS_URL=ioredis://eyJzZW50aW5lbHMiOlt7Imhvc3QiOiJyZWRpcy1zZW50aW5lbDEiLCJwb3J0IjoyNjM3OX0seyJob3N0IjoicmVkaXMtc2VudGluZWwyIiwicG9ydCI6MjYzNzl9XSwibmFtZSI6Im15bWFzdGVyIn0=

# Optional Redis settings:

# Note: these parameters are not automatically passed to the Redis Container
# to do so, please edit the docker-compose.yml file as well. Redis is not configured
# via environment variables, only redis.conf or the command line

# REDIS_PORT=6379
# REDIS_DBINDEX=0
# REDIS_USERNAME=
# REDIS_PASSWORD=
# REDIS_SOCKET=

###################################################################################
# Upload File Location
#
# This is the location where uploaded files are stored.
###################################################################################

UPLOAD_LOCATION="/mnt/User Directory/Immich/storage/"


###################################################################################
# Typesense
###################################################################################
TYPESENSE_API_KEY=werjkgghiweri0oth9
#TYPESENSE_ENABLED=false
# TYPESENSE_URL uses base64 encoding for the nodes json.
# Example JSON that was used:
# [
#      { "host": "typesense-1.example.net", "port": "443", "protocol": "https" },
#      { "host": "typesense-2.example.net", "port": "443", "protocol": "https" },
#      { "host": "typesense-3.example.net", "port": "443", "protocol": "https" },
# ]
# TYPESENSE_URL=ha://WwogIHsgImhvc3QiOiAidHlwZXNlbnNlLTEuZXhhbXBsZS5uZXQiLCAicG9ydCI6ICI0NDMiLCAicHJvdG9jb2wiOiAiaHR0cHMiIH0sCiAgeyAiaG9zdCI6ICJ0eXBlc2Vuc2UtMi5leGFtcGxlLm5ldCIsICJwb3J0IjogIjQ0MyIsICJwcm90b2NvbCI6ICJodHRwcyIgfSwKICB7ICJob3N0IjogInR5cGVzZW5zZS0zLmV4YW1wbGUubmV0IiwgInBvcnQiOiAiNDQzIiwgInByb3RvY29sIjogImh0dHBzIiB9Cl0=

###################################################################################
# Reverse Geocoding
#
# Reverse geocoding is done locally which has a small impact on memory usage
# This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable
# This ranges from 0-3 with 3 being the most precise
# 3 - Cities > 500 population: ~200MB RAM
# 2 - Cities > 1000 population: ~150MB RAM
# 1 - Cities > 5000 population: ~80MB RAM
# 0 - Cities > 15000 population: ~40MB RAM
####################################################################################

# DISABLE_REVERSE_GEOCODING=true
# REVERSE_GEOCODING_PRECISION=3

####################################################################################
# WEB - Optional
#
# Custom message on the login page, should be written in HTML form.
# For example:
# PUBLIC_LOGIN_PAGE_MESSAGE="abandon hope ye who enter here"
####################################################################################

PUBLIC_LOGIN_PAGE_MESSAGE=

####################################################################################
# Alternative Service Addresses - Optional
#
# This is an advanced feature for users who may be running their immich services on different hosts.
# It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers.
# Note: immich-microservices is bound to 3002, but no references are made
####################################################################################

IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=0.0.0.0:3003

####################################################################################
# Alternative API's External Address - Optional
#
# This is an advanced feature used to control the public server endpoint returned to clients during Well-known discovery.
# You should only use this if you want mobile apps to access the immich API over a custom URL. Do not include trailing slash.
# NOTE: At this time, the web app will not be affected by this setting and will continue to use the relative path: /api
# Examples: http://localhost:3001, http://immich-api.example.com, etc
####################################################################################

#IMMICH_API_URL_EXTERNAL=http://localhost:3001

###################################################################################
# Immich Version - Optional
#
# This allows all immich docker images to be pinned to a specific version. By default,
# the version is "release" but could be a specific version, like "v1.59.0".
###################################################################################

#IMMICH_VERSION=

Reproduction steps

1.enable ml
2.watch logs
3.see logs
...

Relevant log output

[Nest] 7  - 06/13/2024, 1:19:16 AM   ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed with status 500: Internal Server Error
immich_server            | [Nest] 7  - 06/13/2024, 1:19:16 AM   ERROR [Microservices:JobService] Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed with status 500: Internal Server Error
immich_server            |     at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:22:19)
immich_server            |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_server            |     at async MachineLearningRepository.encodeImage (/usr/src/app/dist/repositories/machine-learning.repository.js:42:26)
immich_server            |     at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/services/smart-info.service.js:86:27)
immich_server            |     at async /usr/src/app/dist/services/job.service.js:148:36
immich_server            |     at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
immich_server            |     at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
immich_server            | [Nest] 7  - 06/13/2024, 1:19:16 AM   ERROR [Microservices:JobService] Object:
immich_server            | {
immich_server            |   "id": "4f532793-1447-4248-ac28-98ec53124c6c"
immich_server            | }
immich_server            | 
immich_server            | [Nest] 7  - 06/13/2024, 1:19:16 AM   ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: read ECONNRESET
immich_server            | [Nest] 7  - 06/13/2024, 1:19:16 AM   ERROR [Microservices:JobService] Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: read ECONNRESET
immich_server            |     at /usr/src/app/dist/repositories/machine-learning.repository.js:19:19
immich_server            |     at async MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:18:21)
immich_server            |     at async MachineLearningRepository.encodeImage (/usr/src/app/dist/repositories/machine-learning.repository.js:42:26)
immich_server            |     at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/services/smart-info.service.js:86:27)
immich_server            |     at async /usr/src/app/dist/services/job.service.js:148:36
immich_server            |     at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
immich_server            |     at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
immich_server            | [Nest] 7  - 06/13/2024, 1:19:16 AM   ERROR [Microservices:JobService] Object:
immich_server            | {
immich_server            |   "id": "ba67a899-f008-4a93-8035-23599a9ce3e8"
immich_server            | }
immich_server            | 
immich_server            | [Nest] 7  - 06/13/2024, 1:19:17 AM   ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed with status 500: Internal Server Error
immich_server            | [Nest] 7  - 06/13/2024, 1:19:17 AM   ERROR [Microservices:JobService] Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed with status 500: Internal Server Error
immich_server            |     at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:22:19)
immich_server            |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_server            |     at async MachineLearningRepository.encodeImage (/usr/src/app/dist/repositories/machine-learning.repository.js:42:26)
immich_server            |     at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/services/smart-info.service.js:86:27)
immich_server            |     at async /usr/src/app/dist/services/job.service.js:148:36
immich_server            |     at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
immich_server            |     at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
immich_server            | [Nest] 7  - 06/13/2024, 1:19:17 AM   ERROR [Microservices:JobService] Object:
immich_server            | {
immich_server            |   "id": "857c520e-d2f3-4cd8-960f-3e2b8e173a35"
immich_server            | }

Additional information

No response

Originally created by @lordkitsuna on GitHub (Jun 13, 2024). ### The bug enable ML smart search and dedupe, attempts to run, fails. ### The OS that Immich Server is running on arch linux ### Version of Immich Server 1.106.3 ### Version of Immich Mobile App 1.106.1 build 142 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: '3.8' # # WARNING: Make sure to use the docker-compose.yml of the current release: # # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml # # The compose file on main may not be compatible with the latest release. # name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # command: ['start.sh', 'immich'] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - ${EXTERNAL_PATH}:/usr/src/app/external env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always # immich-microservices: # container_name: immich_microservices # image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding # # file: hwaccel.transcoding.yml # # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding # command: ['start.sh', 'microservices'] # volumes: # - ${UPLOAD_LOCATION}:/usr/src/app/upload # - /etc/localtime:/etc/localtime:ro # - ${EXTERNAL_PATH}:/usr/src/app/external # env_file: # - .env # depends_on: # - redis # - database # restart: always immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration # file: hwaccel.ml.yml # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 restart: always database: container_name: immich_postgres image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell ################################################################################### # Database ################################################################################### # NOTE: The following four database variables support Docker secrets by adding a *_FILE suffix to the variable name # See the docker-compose documentation on secrets for additional details: https://docs.docker.com/compose/compose-file/compose-file-v3/#secrets DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_PASSWORD=***** DB_DATABASE_NAME=immich # Optional Database settings: # DB_PORT=5432 ################################################################################### # Redis ################################################################################### REDIS_HOSTNAME=immich_redis # REDIS_URL will be used to pass custom options to ioredis. # Example for Sentinel # {"sentinels":[{"host":"redis-sentinel-node-0","port":26379},{"host":"redis-sentinel-node-1","port":26379},{"host":"redis-sentinel-node-2","port":26379}],"name":"redis-sentinel"} # REDIS_URL=ioredis://eyJzZW50aW5lbHMiOlt7Imhvc3QiOiJyZWRpcy1zZW50aW5lbDEiLCJwb3J0IjoyNjM3OX0seyJob3N0IjoicmVkaXMtc2VudGluZWwyIiwicG9ydCI6MjYzNzl9XSwibmFtZSI6Im15bWFzdGVyIn0= # Optional Redis settings: # Note: these parameters are not automatically passed to the Redis Container # to do so, please edit the docker-compose.yml file as well. Redis is not configured # via environment variables, only redis.conf or the command line # REDIS_PORT=6379 # REDIS_DBINDEX=0 # REDIS_USERNAME= # REDIS_PASSWORD= # REDIS_SOCKET= ################################################################################### # Upload File Location # # This is the location where uploaded files are stored. ################################################################################### UPLOAD_LOCATION="/mnt/User Directory/Immich/storage/" ################################################################################### # Typesense ################################################################################### TYPESENSE_API_KEY=werjkgghiweri0oth9 #TYPESENSE_ENABLED=false # TYPESENSE_URL uses base64 encoding for the nodes json. # Example JSON that was used: # [ # { "host": "typesense-1.example.net", "port": "443", "protocol": "https" }, # { "host": "typesense-2.example.net", "port": "443", "protocol": "https" }, # { "host": "typesense-3.example.net", "port": "443", "protocol": "https" }, # ] # TYPESENSE_URL=ha://WwogIHsgImhvc3QiOiAidHlwZXNlbnNlLTEuZXhhbXBsZS5uZXQiLCAicG9ydCI6ICI0NDMiLCAicHJvdG9jb2wiOiAiaHR0cHMiIH0sCiAgeyAiaG9zdCI6ICJ0eXBlc2Vuc2UtMi5leGFtcGxlLm5ldCIsICJwb3J0IjogIjQ0MyIsICJwcm90b2NvbCI6ICJodHRwcyIgfSwKICB7ICJob3N0IjogInR5cGVzZW5zZS0zLmV4YW1wbGUubmV0IiwgInBvcnQiOiAiNDQzIiwgInByb3RvY29sIjogImh0dHBzIiB9Cl0= ################################################################################### # Reverse Geocoding # # Reverse geocoding is done locally which has a small impact on memory usage # This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable # This ranges from 0-3 with 3 being the most precise # 3 - Cities > 500 population: ~200MB RAM # 2 - Cities > 1000 population: ~150MB RAM # 1 - Cities > 5000 population: ~80MB RAM # 0 - Cities > 15000 population: ~40MB RAM #################################################################################### # DISABLE_REVERSE_GEOCODING=true # REVERSE_GEOCODING_PRECISION=3 #################################################################################### # WEB - Optional # # Custom message on the login page, should be written in HTML form. # For example: # PUBLIC_LOGIN_PAGE_MESSAGE="abandon hope ye who enter here" #################################################################################### PUBLIC_LOGIN_PAGE_MESSAGE= #################################################################################### # Alternative Service Addresses - Optional # # This is an advanced feature for users who may be running their immich services on different hosts. # It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers. # Note: immich-microservices is bound to 3002, but no references are made #################################################################################### IMMICH_WEB_URL=http://immich-web:3000 IMMICH_SERVER_URL=http://immich-server:3001 IMMICH_MACHINE_LEARNING_URL=0.0.0.0:3003 #################################################################################### # Alternative API's External Address - Optional # # This is an advanced feature used to control the public server endpoint returned to clients during Well-known discovery. # You should only use this if you want mobile apps to access the immich API over a custom URL. Do not include trailing slash. # NOTE: At this time, the web app will not be affected by this setting and will continue to use the relative path: /api # Examples: http://localhost:3001, http://immich-api.example.com, etc #################################################################################### #IMMICH_API_URL_EXTERNAL=http://localhost:3001 ################################################################################### # Immich Version - Optional # # This allows all immich docker images to be pinned to a specific version. By default, # the version is "release" but could be a specific version, like "v1.59.0". ################################################################################### #IMMICH_VERSION= ``` ### Reproduction steps ```bash 1.enable ml 2.watch logs 3.see logs ... ``` ### Relevant log output ```shell [Nest] 7 - 06/13/2024, 1:19:16 AM ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed with status 500: Internal Server Error immich_server | [Nest] 7 - 06/13/2024, 1:19:16 AM ERROR [Microservices:JobService] Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed with status 500: Internal Server Error immich_server | at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:22:19) immich_server | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) immich_server | at async MachineLearningRepository.encodeImage (/usr/src/app/dist/repositories/machine-learning.repository.js:42:26) immich_server | at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/services/smart-info.service.js:86:27) immich_server | at async /usr/src/app/dist/services/job.service.js:148:36 immich_server | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) immich_server | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) immich_server | [Nest] 7 - 06/13/2024, 1:19:16 AM ERROR [Microservices:JobService] Object: immich_server | { immich_server | "id": "4f532793-1447-4248-ac28-98ec53124c6c" immich_server | } immich_server | immich_server | [Nest] 7 - 06/13/2024, 1:19:16 AM ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: read ECONNRESET immich_server | [Nest] 7 - 06/13/2024, 1:19:16 AM ERROR [Microservices:JobService] Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: read ECONNRESET immich_server | at /usr/src/app/dist/repositories/machine-learning.repository.js:19:19 immich_server | at async MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:18:21) immich_server | at async MachineLearningRepository.encodeImage (/usr/src/app/dist/repositories/machine-learning.repository.js:42:26) immich_server | at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/services/smart-info.service.js:86:27) immich_server | at async /usr/src/app/dist/services/job.service.js:148:36 immich_server | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) immich_server | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) immich_server | [Nest] 7 - 06/13/2024, 1:19:16 AM ERROR [Microservices:JobService] Object: immich_server | { immich_server | "id": "ba67a899-f008-4a93-8035-23599a9ce3e8" immich_server | } immich_server | immich_server | [Nest] 7 - 06/13/2024, 1:19:17 AM ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed with status 500: Internal Server Error immich_server | [Nest] 7 - 06/13/2024, 1:19:17 AM ERROR [Microservices:JobService] Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed with status 500: Internal Server Error immich_server | at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:22:19) immich_server | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) immich_server | at async MachineLearningRepository.encodeImage (/usr/src/app/dist/repositories/machine-learning.repository.js:42:26) immich_server | at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/services/smart-info.service.js:86:27) immich_server | at async /usr/src/app/dist/services/job.service.js:148:36 immich_server | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) immich_server | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) immich_server | [Nest] 7 - 06/13/2024, 1:19:17 AM ERROR [Microservices:JobService] Object: immich_server | { immich_server | "id": "857c520e-d2f3-4cd8-960f-3e2b8e173a35" immich_server | } ``` ### Additional information _No response_
Author
Owner

@mertalev commented on GitHub (Jun 13, 2024):

Can you share the ML container logs? Based on the logs you shared it’s probably crashing.

@mertalev commented on GitHub (Jun 13, 2024): Can you share the ML container logs? Based on the logs you shared it’s probably crashing.
Author
Owner

@lordkitsuna commented on GitHub (Jun 13, 2024):

Can you share the ML container logs? Based on the logs you shared it’s probably crashing.


immich_machine_learning  | [06/13/24 01:08:02] INFO     Starting gunicorn 22.0.0                           
immich_machine_learning  | [06/13/24 01:08:02] INFO     Listening at: http://[::]:3003 (9)                 
immich_machine_learning  | [06/13/24 01:08:02] INFO     Using worker: app.config.CustomUvicornWorker       
immich_machine_learning  | [06/13/24 01:08:02] INFO     Booting worker with pid: 10                        
immich_machine_learning  | [06/13/24 01:08:05] INFO     Started server process [10]                        
immich_machine_learning  | [06/13/24 01:08:05] INFO     Waiting for application startup.                   
immich_machine_learning  | [06/13/24 01:08:05] INFO     Created in-memory cache with unloading after 300s  
immich_machine_learning  |                              of inactivity.                                     
immich_machine_learning  | [06/13/24 01:08:05] INFO     Initialized request thread pool with 48 threads.   
immich_machine_learning  | [06/13/24 01:08:05] INFO     Application startup complete.                      
immich_machine_learning  | [06/13/24 01:17:37] INFO     Setting 'ViT-B-32__openai' execution providers to  
immich_machine_learning  |                              ['CPUExecutionProvider'], in descending order of   
immich_machine_learning  |                              preference                                         
immich_machine_learning  | [06/13/24 01:17:37] INFO     Downloading visual model 'ViT-B-32__openai'. This  
immich_machine_learning  |                              may take a while.                                  
immich_machine_learning  | /opt/venv/lib/python3.11/site-packages/huggingface_hub/file_download.py:1194: UserWarning: `local_dir_use_symlinks` parameter is deprecated and will be ignored. The process to download files to a local folder has been updated and do not rely on symlinks anymore. You only need to pass a destination folder as`local_dir`.
immich_machine_learning  | For more details, check out https://huggingface.co/docs/huggingface_hub/main/en/guides/download#download-files-to-local-folder.
immich_machine_learning  |   warnings.warn(
Fetching 11 files: 100%|██████████| 11/11 [00:02<00:00,  3.83it/s]
immich_machine_learning  | [06/13/24 01:17:40] INFO     Loading visual model 'ViT-B-32__openai' to memory  
immich_machine_learning  | [06/13/24 01:19:16] ERROR    Exception in ASGI application                      
immich_machine_learning  |                                                                                 
immich_machine_learning  |                              ╭─────── Traceback (most recent call last) ───────╮
immich_machine_learning  |                              │ /usr/src/app/main.py:146 in predict             │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   143 │   text: str | None = Form(default=None) │
immich_machine_learning  |                              │   144 ) -> Any:                                 │
immich_machine_learning  |                              │   145 │   if image is not None:                 │
immich_machine_learning  |                              │ ❱ 146 │   │   inputs: Image | str = await run(l │
immich_machine_learning  |                              │   147 │   elif text is not None:                │
immich_machine_learning  |                              │   148 │   │   inputs = text                     │
immich_machine_learning  |                              │   149 │   else:                                 │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /usr/src/app/main.py:187 in run                 │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   184 │   if thread_pool is None:               │
immich_machine_learning  |                              │   185 │   │   return func(*args, **kwargs)      │
immich_machine_learning  |                              │   186 │   partial_func = partial(func, *args, * │
immich_machine_learning  |                              │ ❱ 187 │   return await asyncio.get_running_loop │
immich_machine_learning  |                              │   188                                           │
immich_machine_learning  |                              │   189                                           │
immich_machine_learning  |                              │   190 async def load(model: InferenceModel) ->  │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /usr/local/lib/python3.11/concurrent/futures/th │
immich_machine_learning  |                              │ read.py:58 in run                               │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /usr/src/app/main.py:146 in <lambda>            │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   143 │   text: str | None = Form(default=None) │
immich_machine_learning  |                              │   144 ) -> Any:                                 │
immich_machine_learning  |                              │   145 │   if image is not None:                 │
immich_machine_learning  |                              │ ❱ 146 │   │   inputs: Image | str = await run(l │
immich_machine_learning  |                              │   147 │   elif text is not None:                │
immich_machine_learning  |                              │   148 │   │   inputs = text                     │
immich_machine_learning  |                              │   149 │   else:                                 │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /usr/src/app/models/transforms.py:50 in         │
immich_machine_learning  |                              │ decode_pil                                      │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   47 def decode_pil(image_bytes: bytes | IO[byt │
immich_machine_learning  |                              │   48 │   if isinstance(image_bytes, Image.Image │
immich_machine_learning  |                              │   49 │   │   return image_bytes                 │
immich_machine_learning  |                              │ ❱ 50 │   image = Image.open(BytesIO(image_bytes │
immich_machine_learning  |                              │      image_bytes)                               │
immich_machine_learning  |                              │   51 │   image.load()  # type: ignore           │
immich_machine_learning  |                              │   52 │   if not image.mode == "RGB":            │
immich_machine_learning  |                              │   53 │   │   image = image.convert("RGB")       │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /opt/venv/lib/python3.11/site-packages/PIL/Imag │
immich_machine_learning  |                              │ e.py:3339 in open                               │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   3336 │   for message in accept_warnings:      │
immich_machine_learning  |                              │   3337 │   │   warnings.warn(message)           │
immich_machine_learning  |                              │   3338 │   msg = "cannot identify image file %r │
immich_machine_learning  |                              │ ❱ 3339 │   raise UnidentifiedImageError(msg)    │
immich_machine_learning  |                              │   3340                                          │
immich_machine_learning  |                              │   3341                                          │
immich_machine_learning  |                              │   3342 #                                        │
immich_machine_learning  |                              ╰─────────────────────────────────────────────────╯
immich_machine_learning  |                              UnidentifiedImageError: cannot identify image file 
immich_machine_learning  |                              <_io.BytesIO object at 0x769bfa2b0b80>             
immich_machine_learning  | [06/13/24 01:19:16] ERROR    Exception in ASGI application                      
immich_machine_learning  |                                                                                 
immich_machine_learning  |                              ╭─────── Traceback (most recent call last) ───────╮
immich_machine_learning  |                              │ /usr/src/app/main.py:146 in predict             │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   143 │   text: str | None = Form(default=None) │
immich_machine_learning  |                              │   144 ) -> Any:                                 │
immich_machine_learning  |                              │   145 │   if image is not None:                 │
immich_machine_learning  |                              │ ❱ 146 │   │   inputs: Image | str = await run(l │
immich_machine_learning  |                              │   147 │   elif text is not None:                │
immich_machine_learning  |                              │   148 │   │   inputs = text                     │
immich_machine_learning  |                              │   149 │   else:                                 │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /usr/src/app/main.py:187 in run                 │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   184 │   if thread_pool is None:               │
immich_machine_learning  |                              │   185 │   │   return func(*args, **kwargs)      │
immich_machine_learning  |                              │   186 │   partial_func = partial(func, *args, * │
immich_machine_learning  |                              │ ��� 187 │   return await asyncio.get_running_loop │
immich_machine_learning  |                              │   188                                           │
immich_machine_learning  |                              │   189                                           │
immich_machine_learning  |                              │   190 async def load(model: InferenceModel) ->  │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /usr/local/lib/python3.11/concurrent/futures/th │
immich_machine_learning  |                              │ read.py:58 in run                               │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /usr/src/app/main.py:146 in <lambda>            │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   143 │   text: str | None = Form(default=None) │
immich_machine_learning  |                              │   144 ) -> Any:                                 │
immich_machine_learning  |                              │   145 │   if image is not None:                 │
immich_machine_learning  |                              │ ❱ 146 │   │   inputs: Image | str = await run(l │
immich_machine_learning  |                              │   147 │   elif text is not None:                │
immich_machine_learning  |                              │   148 │   │   inputs = text                     │
immich_machine_learning  |                              │   149 │   else:                                 │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /usr/src/app/models/transforms.py:50 in         │
immich_machine_learning  |                              │ decode_pil                                      │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   47 def decode_pil(image_bytes: bytes | IO[byt │
immich_machine_learning  |                              │   48 │   if isinstance(image_bytes, Image.Image │
immich_machine_learning  |                              │   49 │   │   return image_bytes                 │
immich_machine_learning  |                              │ ❱ 50 │   image = Image.open(BytesIO(image_bytes │
immich_machine_learning  |                              │      image_bytes)                               │
immich_machine_learning  |                              │   51 │   image.load()  # type: ignore           │
immich_machine_learning  |                              │   52 │   if not image.mode == "RGB":            │
immich_machine_learning  |                              │   53 │   │   image = image.convert("RGB")       │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │ /opt/venv/lib/python3.11/site-packages/PIL/Imag │
immich_machine_learning  |                              │ e.py:3339 in open                               │
immich_machine_learning  |                              │                                                 │
immich_machine_learning  |                              │   3336 │   for message in accept_warnings:      │
immich_machine_learning  |                              │   3337 │   │   warnings.warn(message)           │
immich_machine_learning  |                              │   3338 │   msg = "cannot identify image file %r │
immich_machine_learning  |                              │ ❱ 3339 │   raise UnidentifiedImageError(msg)    │
immich_machine_learning  |                              │   3340                                          │
immich_machine_learning  |                              │   3341                                          │
immich_machine_learning  |                              │   3342 #                                        │
immich_machine_learning  |                              ╰─────────────────────────────────────────────────╯
immich_machine_learning  |                              UnidentifiedImageError: cannot identify image file 
immich_machine_learning  |                              <_io.BytesIO object at 0x769bfa255940>             
immich_machine_learning  | [06/13/24 01:54:55] INFO     Shutting down due to inactivity.                   
immich_machine_learning  | [06/13/24 01:54:55] INFO     Shutting down                                      
immich_machine_learning  | [06/13/24 01:54:55] INFO     Waiting for application shutdown.                  
immich_machine_learning  | [06/13/24 01:54:55] INFO     Application shutdown complete.                     
immich_machine_learning  | [06/13/24 01:54:55] INFO     Finished server process [10]                       
immich_machine_learning  | [06/13/24 01:54:55] ERROR    Worker (pid:10) was sent SIGINT!                   
immich_machine_learning  | [06/13/24 01:54:55] INFO     Booting worker with pid: 899                       
immich_machine_learning  | [06/13/24 01:54:58] INFO     Started server process [899]                       
immich_machine_learning  | [06/13/24 01:54:58] INFO     Waiting for application startup.                   
immich_machine_learning  | [06/13/24 01:54:58] INFO     Created in-memory cache with unloading after 300s  
immich_machine_learning  |                              of inactivity.                                     
immich_machine_learning  | [06/13/24 01:54:58] INFO     Initialized request thread pool with 48 threads.   
immich_machine_learning  | [06/13/24 01:54:58] INFO     Application startup complete.                      
immich_machine_learning  | [06/13/24 02:04:35] INFO     Setting 'ViT-B-32__openai' execution providers to  
immich_machine_learning  |                              ['CPUExecutionProvider'], in descending order of   
immich_machine_learning  |                              preference                                         
immich_machine_learning  | [06/13/24 02:04:35] INFO     Loading visual model 'ViT-B-32__openai' to memory  
immich_machine_learning  | [06/13/24 02:09:48] INFO     Shutting down due to inactivity.                   
immich_machine_learning  | [06/13/24 02:09:48] INFO     Shutting down                                      
immich_machine_learning  | [06/13/24 02:09:48] INFO     Waiting for application shutdown.                  
immich_machine_learning  | [06/13/24 02:09:48] INFO     Application shutdown complete.                     
immich_machine_learning  | [06/13/24 02:09:48] INFO     Finished server process [899]                      
immich_machine_learning  | [06/13/24 02:09:48] ERROR    Worker (pid:899) was sent SIGINT!                  
immich_machine_learning  | [06/13/24 02:09:48] INFO     Booting worker with pid: 1201                      
immich_machine_learning  | [06/13/24 02:09:51] INFO     Started server process [1201]                      
immich_machine_learning  | [06/13/24 02:09:51] INFO     Waiting for application startup.                   
immich_machine_learning  | [06/13/24 02:09:51] INFO     Created in-memory cache with unloading after 300s  
immich_machine_learning  |                              of inactivity.                                     
immich_machine_learning  | [06/13/24 02:09:51] INFO     Initialized request thread pool with 48 threads.   
immich_machine_learning  | [06/13/24 02:09:51] INFO     Application startup complete.                      
immich_machine_learning  | [06/13/24 02:12:44] INFO     Setting 'ViT-B-32__openai' execution providers to  
immich_machine_learning  |                              ['CPUExecutionProvider'], in descending order of   
immich_machine_learning  |                              preference                                         
immich_machine_learning  | [06/13/24 02:12:44] INFO     Loading visual model 'ViT-B-32__openai' to memory  
immich_machine_learning  | [06/13/24 02:17:51] INFO     Shutting down due to inactivity.                   
immich_machine_learning  | [06/13/24 02:17:51] INFO     Shutting down                                      
immich_machine_learning  | [06/13/24 02:17:51] INFO     Waiting for application shutdown.                  
immich_machine_learning  | [06/13/24 02:17:51] INFO     Application shutdown complete.                     

if i am reading this correctly its failing to download the model i think?

@lordkitsuna commented on GitHub (Jun 13, 2024): > Can you share the ML container logs? Based on the logs you shared it’s probably crashing. ``` immich_machine_learning | [06/13/24 01:08:02] INFO Starting gunicorn 22.0.0 immich_machine_learning | [06/13/24 01:08:02] INFO Listening at: http://[::]:3003 (9) immich_machine_learning | [06/13/24 01:08:02] INFO Using worker: app.config.CustomUvicornWorker immich_machine_learning | [06/13/24 01:08:02] INFO Booting worker with pid: 10 immich_machine_learning | [06/13/24 01:08:05] INFO Started server process [10] immich_machine_learning | [06/13/24 01:08:05] INFO Waiting for application startup. immich_machine_learning | [06/13/24 01:08:05] INFO Created in-memory cache with unloading after 300s immich_machine_learning | of inactivity. immich_machine_learning | [06/13/24 01:08:05] INFO Initialized request thread pool with 48 threads. immich_machine_learning | [06/13/24 01:08:05] INFO Application startup complete. immich_machine_learning | [06/13/24 01:17:37] INFO Setting 'ViT-B-32__openai' execution providers to immich_machine_learning | ['CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [06/13/24 01:17:37] INFO Downloading visual model 'ViT-B-32__openai'. This immich_machine_learning | may take a while. immich_machine_learning | /opt/venv/lib/python3.11/site-packages/huggingface_hub/file_download.py:1194: UserWarning: `local_dir_use_symlinks` parameter is deprecated and will be ignored. The process to download files to a local folder has been updated and do not rely on symlinks anymore. You only need to pass a destination folder as`local_dir`. immich_machine_learning | For more details, check out https://huggingface.co/docs/huggingface_hub/main/en/guides/download#download-files-to-local-folder. immich_machine_learning | warnings.warn( Fetching 11 files: 100%|██████████| 11/11 [00:02<00:00, 3.83it/s] immich_machine_learning | [06/13/24 01:17:40] INFO Loading visual model 'ViT-B-32__openai' to memory immich_machine_learning | [06/13/24 01:19:16] ERROR Exception in ASGI application immich_machine_learning | immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮ immich_machine_learning | │ /usr/src/app/main.py:146 in predict │ immich_machine_learning | │ │ immich_machine_learning | │ 143 │ text: str | None = Form(default=None) │ immich_machine_learning | │ 144 ) -> Any: │ immich_machine_learning | │ 145 │ if image is not None: │ immich_machine_learning | │ ❱ 146 │ │ inputs: Image | str = await run(l │ immich_machine_learning | │ 147 │ elif text is not None: │ immich_machine_learning | │ 148 │ │ inputs = text │ immich_machine_learning | │ 149 │ else: │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/main.py:187 in run │ immich_machine_learning | │ │ immich_machine_learning | │ 184 │ if thread_pool is None: │ immich_machine_learning | │ 185 │ │ return func(*args, **kwargs) │ immich_machine_learning | │ 186 │ partial_func = partial(func, *args, * │ immich_machine_learning | │ ❱ 187 │ return await asyncio.get_running_loop │ immich_machine_learning | │ 188 │ immich_machine_learning | │ 189 │ immich_machine_learning | │ 190 async def load(model: InferenceModel) -> │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/local/lib/python3.11/concurrent/futures/th │ immich_machine_learning | │ read.py:58 in run │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/main.py:146 in <lambda> │ immich_machine_learning | │ │ immich_machine_learning | │ 143 │ text: str | None = Form(default=None) │ immich_machine_learning | │ 144 ) -> Any: │ immich_machine_learning | │ 145 │ if image is not None: │ immich_machine_learning | │ ❱ 146 │ │ inputs: Image | str = await run(l │ immich_machine_learning | │ 147 │ elif text is not None: │ immich_machine_learning | │ 148 │ │ inputs = text │ immich_machine_learning | │ 149 │ else: │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/models/transforms.py:50 in │ immich_machine_learning | │ decode_pil │ immich_machine_learning | │ │ immich_machine_learning | │ 47 def decode_pil(image_bytes: bytes | IO[byt │ immich_machine_learning | │ 48 │ if isinstance(image_bytes, Image.Image │ immich_machine_learning | │ 49 │ │ return image_bytes │ immich_machine_learning | │ ❱ 50 │ image = Image.open(BytesIO(image_bytes │ immich_machine_learning | │ image_bytes) │ immich_machine_learning | │ 51 │ image.load() # type: ignore │ immich_machine_learning | │ 52 │ if not image.mode == "RGB": │ immich_machine_learning | │ 53 │ │ image = image.convert("RGB") │ immich_machine_learning | │ │ immich_machine_learning | │ /opt/venv/lib/python3.11/site-packages/PIL/Imag │ immich_machine_learning | │ e.py:3339 in open │ immich_machine_learning | │ │ immich_machine_learning | │ 3336 │ for message in accept_warnings: │ immich_machine_learning | │ 3337 │ │ warnings.warn(message) │ immich_machine_learning | │ 3338 │ msg = "cannot identify image file %r │ immich_machine_learning | │ ❱ 3339 │ raise UnidentifiedImageError(msg) │ immich_machine_learning | │ 3340 │ immich_machine_learning | │ 3341 │ immich_machine_learning | │ 3342 # │ immich_machine_learning | ╰─────────────────────────────────────────────────╯ immich_machine_learning | UnidentifiedImageError: cannot identify image file immich_machine_learning | <_io.BytesIO object at 0x769bfa2b0b80> immich_machine_learning | [06/13/24 01:19:16] ERROR Exception in ASGI application immich_machine_learning | immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮ immich_machine_learning | │ /usr/src/app/main.py:146 in predict │ immich_machine_learning | │ │ immich_machine_learning | │ 143 │ text: str | None = Form(default=None) │ immich_machine_learning | │ 144 ) -> Any: │ immich_machine_learning | │ 145 │ if image is not None: │ immich_machine_learning | │ ❱ 146 │ │ inputs: Image | str = await run(l │ immich_machine_learning | │ 147 │ elif text is not None: │ immich_machine_learning | │ 148 │ │ inputs = text │ immich_machine_learning | │ 149 │ else: │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/main.py:187 in run │ immich_machine_learning | │ │ immich_machine_learning | │ 184 │ if thread_pool is None: │ immich_machine_learning | │ 185 │ │ return func(*args, **kwargs) │ immich_machine_learning | │ 186 │ partial_func = partial(func, *args, * │ immich_machine_learning | │ ��� 187 │ return await asyncio.get_running_loop │ immich_machine_learning | │ 188 │ immich_machine_learning | │ 189 │ immich_machine_learning | │ 190 async def load(model: InferenceModel) -> │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/local/lib/python3.11/concurrent/futures/th │ immich_machine_learning | │ read.py:58 in run │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/main.py:146 in <lambda> │ immich_machine_learning | │ │ immich_machine_learning | │ 143 │ text: str | None = Form(default=None) │ immich_machine_learning | │ 144 ) -> Any: │ immich_machine_learning | │ 145 │ if image is not None: │ immich_machine_learning | │ ❱ 146 │ │ inputs: Image | str = await run(l │ immich_machine_learning | │ 147 │ elif text is not None: │ immich_machine_learning | │ 148 │ │ inputs = text │ immich_machine_learning | │ 149 │ else: │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/models/transforms.py:50 in │ immich_machine_learning | │ decode_pil │ immich_machine_learning | │ │ immich_machine_learning | │ 47 def decode_pil(image_bytes: bytes | IO[byt │ immich_machine_learning | │ 48 │ if isinstance(image_bytes, Image.Image │ immich_machine_learning | │ 49 │ │ return image_bytes │ immich_machine_learning | │ ❱ 50 │ image = Image.open(BytesIO(image_bytes │ immich_machine_learning | │ image_bytes) │ immich_machine_learning | │ 51 │ image.load() # type: ignore │ immich_machine_learning | │ 52 │ if not image.mode == "RGB": │ immich_machine_learning | │ 53 │ │ image = image.convert("RGB") │ immich_machine_learning | │ │ immich_machine_learning | │ /opt/venv/lib/python3.11/site-packages/PIL/Imag │ immich_machine_learning | │ e.py:3339 in open │ immich_machine_learning | │ │ immich_machine_learning | │ 3336 │ for message in accept_warnings: │ immich_machine_learning | │ 3337 │ │ warnings.warn(message) │ immich_machine_learning | │ 3338 │ msg = "cannot identify image file %r │ immich_machine_learning | │ ❱ 3339 │ raise UnidentifiedImageError(msg) │ immich_machine_learning | │ 3340 │ immich_machine_learning | │ 3341 │ immich_machine_learning | │ 3342 # │ immich_machine_learning | ╰─────────────────────────────────────────────────╯ immich_machine_learning | UnidentifiedImageError: cannot identify image file immich_machine_learning | <_io.BytesIO object at 0x769bfa255940> immich_machine_learning | [06/13/24 01:54:55] INFO Shutting down due to inactivity. immich_machine_learning | [06/13/24 01:54:55] INFO Shutting down immich_machine_learning | [06/13/24 01:54:55] INFO Waiting for application shutdown. immich_machine_learning | [06/13/24 01:54:55] INFO Application shutdown complete. immich_machine_learning | [06/13/24 01:54:55] INFO Finished server process [10] immich_machine_learning | [06/13/24 01:54:55] ERROR Worker (pid:10) was sent SIGINT! immich_machine_learning | [06/13/24 01:54:55] INFO Booting worker with pid: 899 immich_machine_learning | [06/13/24 01:54:58] INFO Started server process [899] immich_machine_learning | [06/13/24 01:54:58] INFO Waiting for application startup. immich_machine_learning | [06/13/24 01:54:58] INFO Created in-memory cache with unloading after 300s immich_machine_learning | of inactivity. immich_machine_learning | [06/13/24 01:54:58] INFO Initialized request thread pool with 48 threads. immich_machine_learning | [06/13/24 01:54:58] INFO Application startup complete. immich_machine_learning | [06/13/24 02:04:35] INFO Setting 'ViT-B-32__openai' execution providers to immich_machine_learning | ['CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [06/13/24 02:04:35] INFO Loading visual model 'ViT-B-32__openai' to memory immich_machine_learning | [06/13/24 02:09:48] INFO Shutting down due to inactivity. immich_machine_learning | [06/13/24 02:09:48] INFO Shutting down immich_machine_learning | [06/13/24 02:09:48] INFO Waiting for application shutdown. immich_machine_learning | [06/13/24 02:09:48] INFO Application shutdown complete. immich_machine_learning | [06/13/24 02:09:48] INFO Finished server process [899] immich_machine_learning | [06/13/24 02:09:48] ERROR Worker (pid:899) was sent SIGINT! immich_machine_learning | [06/13/24 02:09:48] INFO Booting worker with pid: 1201 immich_machine_learning | [06/13/24 02:09:51] INFO Started server process [1201] immich_machine_learning | [06/13/24 02:09:51] INFO Waiting for application startup. immich_machine_learning | [06/13/24 02:09:51] INFO Created in-memory cache with unloading after 300s immich_machine_learning | of inactivity. immich_machine_learning | [06/13/24 02:09:51] INFO Initialized request thread pool with 48 threads. immich_machine_learning | [06/13/24 02:09:51] INFO Application startup complete. immich_machine_learning | [06/13/24 02:12:44] INFO Setting 'ViT-B-32__openai' execution providers to immich_machine_learning | ['CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [06/13/24 02:12:44] INFO Loading visual model 'ViT-B-32__openai' to memory immich_machine_learning | [06/13/24 02:17:51] INFO Shutting down due to inactivity. immich_machine_learning | [06/13/24 02:17:51] INFO Shutting down immich_machine_learning | [06/13/24 02:17:51] INFO Waiting for application shutdown. immich_machine_learning | [06/13/24 02:17:51] INFO Application shutdown complete. ``` if i am reading this correctly its failing to download the model i think?
Author
Owner

@alextran1502 commented on GitHub (Jun 13, 2024):

Are you located in China by chance?

@alextran1502 commented on GitHub (Jun 13, 2024): Are you located in China by chance?
Author
Owner

@mertalev commented on GitHub (Jun 13, 2024):

UnidentifiedImageError: cannot identify image file

It's not a download issue; the image it received was corrupt or empty. Probably a failed job from thumbnail generation.

@mertalev commented on GitHub (Jun 13, 2024): > UnidentifiedImageError: cannot identify image file It's not a download issue; the image it received was corrupt or empty. Probably a failed job from thumbnail generation.
Author
Owner

@lordkitsuna commented on GitHub (Jun 13, 2024):

Are you located in China by chance?

Nope, usa

@lordkitsuna commented on GitHub (Jun 13, 2024): > Are you located in China by chance? Nope, usa
Author
Owner

@lordkitsuna commented on GitHub (Jun 13, 2024):

UnidentifiedImageError: cannot identify image file

It's not a download issue; the image it received was corrupt or empty. Probably a failed job from thumbnail generation.

Any way to fix that? The rest of the log is just the loading then shutting down in an endless circle

@lordkitsuna commented on GitHub (Jun 13, 2024): > > UnidentifiedImageError: cannot identify image file > > It's not a download issue; the image it received was corrupt or empty. Probably a failed job from thumbnail generation. Any way to fix that? The rest of the log is just the loading then shutting down in an endless circle
Author
Owner

@mertalev commented on GitHub (Jun 13, 2024):

It doesn't log successes, so if this error only popped up here and there and not for every image, then it did process what it could. I guess I would check the server logs for thumbnail generation and check if there are any 0kb previews in the thumbs folder.

@mertalev commented on GitHub (Jun 13, 2024): It doesn't log successes, so if this error only popped up here and there and not for every image, then it did process what it could. I guess I would check the server logs for thumbnail generation and check if there are any 0kb previews in the thumbs folder.
Author
Owner

@dizzybro commented on GitHub (Jun 16, 2024):

I am having the same issue, although I do no see any errors in my machine learning container and it says it is starting successfully.

@dizzybro commented on GitHub (Jun 16, 2024): I am having the same issue, although I do no see any errors in my machine learning container and it says it is starting successfully.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#3488