The machine learning models cannot be downloaded. #2051

Closed
opened 2026-02-20 01:01:30 -05:00 by deekerman · 8 comments
Owner

Originally created by @Haoke98 on GitHub (Jan 23, 2024).

The bug

The machine learning model cannot be downloaded. I tried to manually transfer the model from huggingface to the local cache but nothing happened.
截屏2024-01-24 11 19 34

The OS that Immich Server is running on

CentOS Linux 7 (Core), Linux slrch64T 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Version of Immich Server

v1.93.3

Version of Immich Mobile App

v1.93.2 build.135

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
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee
    env_file:
      - .env
    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

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=192.168.1.31
REDIS_PORT=6739
REDIS_PASSWORD=slrch@Redis2022,.
REDIS_DBINDEX=14

Reproduction steps

1.Installing the server successfull.
2.Web page preview is also normal
3.The mobile phone connection is also normal.
4.But, when I want to use the people function on it, I found that it wasn't working properly.
5.Check the console of machine learning container's log, I found that waring above.
6.I tried to download the models by myself from the huggingface, but it doesn't working.

Additional information

No response

Originally created by @Haoke98 on GitHub (Jan 23, 2024). ### The bug The machine learning model cannot be downloaded. I tried to manually transfer the model from huggingface to the local cache but nothing happened. <img width="671" alt="截屏2024-01-24 11 19 34" src="https://github.com/immich-app/immich/assets/55436234/ea39a387-f74f-4214-b8af-dbc494fcf5b7"> ### The OS that Immich Server is running on CentOS Linux 7 (Core), Linux slrch64T 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux ### Version of Immich Server v1.93.3 ### Version of Immich Mobile App v1.93.2 build.135 ### 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 env_file: - .env ports: - 2283:3001 depends_on: - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.yml # service: hwaccel command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env depends_on: - database restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - .env restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee env_file: - .env 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 # The location where your uploaded files are stored UPLOAD_LOCATION=./library # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password DB_PASSWORD=postgres # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=192.168.1.31 REDIS_PORT=6739 REDIS_PASSWORD=slrch@Redis2022,. REDIS_DBINDEX=14 ``` ### Reproduction steps ```bash 1.Installing the server successfull. 2.Web page preview is also normal 3.The mobile phone connection is also normal. 4.But, when I want to use the people function on it, I found that it wasn't working properly. 5.Check the console of machine learning container's log, I found that waring above. 6.I tried to download the models by myself from the huggingface, but it doesn't working. ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Jan 23, 2024):

if you are from mainland China, you probably cannot download the model, you will have to use a proxy to download it from Hugging face https://huggingface.co/immich-app and then put it in the cache folder

@alextran1502 commented on GitHub (Jan 23, 2024): if you are from mainland China, you probably cannot download the model, you will have to use a proxy to download it from Hugging face https://huggingface.co/immich-app and then put it in the cache folder
Author
Owner

@Haoke98 commented on GitHub (Jan 23, 2024):

Thank you very much for your immediate reply, but I have already tried this method, but it was not recognized by the machine learning container after downloading it. Can you help me see if there is something wrong with the storage format?
截屏2024-01-24 11 43 16
截屏2024-01-24 11 46 35

@Haoke98 commented on GitHub (Jan 23, 2024): Thank you very much for your immediate reply, but I have already tried this method, but it was not recognized by the machine learning container after downloading it. Can you help me see if there is something wrong with the storage format? <img width="294" alt="截屏2024-01-24 11 43 16" src="https://github.com/immich-app/immich/assets/55436234/8b7eb2f2-700a-4e00-b2db-8c0c5a278e7d"> <img width="354" alt="截屏2024-01-24 11 46 35" src="https://github.com/immich-app/immich/assets/55436234/bf149396-29d1-42a5-9ef2-359160db3133">
Author
Owner

@alextran1502 commented on GitHub (Jan 23, 2024):

This is what I have for my volume
image

@alextran1502 commented on GitHub (Jan 23, 2024): This is what I have for my volume ![image](https://github.com/immich-app/immich/assets/27055614/816129f3-6d4f-403b-a6f5-1414550be59c)
Author
Owner

@Haoke98 commented on GitHub (Jan 23, 2024):

Thansk you a lot. 🤓

@Haoke98 commented on GitHub (Jan 23, 2024): Thansk you a lot. 🤓
Author
Owner

@Haoke98 commented on GitHub (Jan 23, 2024):

The another question is the folders models--immich--app--<model-name> did`nt appear inner model folder . At the same time, after I changed the directory structure according to yours, the machine learning container took the initiative to delete the contents of the model directory for me because it could not load the model.

@Haoke98 commented on GitHub (Jan 23, 2024): The another question is the folders `models--immich--app--<model-name>` did`nt appear inner model folder . At the same time, after I changed the directory structure according to yours, the machine learning container took the initiative to delete the contents of the model directory for me because it could not load the model.
Author
Owner

@alextran1502 commented on GitHub (Jan 24, 2024):

cc @mertalev, do you have any suggestion on the folder structure for the model in this case?

@alextran1502 commented on GitHub (Jan 24, 2024): cc @mertalev, do you have any suggestion on the folder structure for the model in this case?
Author
Owner

@mertalev commented on GitHub (Jan 24, 2024):

You can ignore the models--immich--app folders. The important files are the .onnx and .json files. Make sure you have all of them and that the .onnx file sizes are correct - there might be an incomplete / corrupt download.

@mertalev commented on GitHub (Jan 24, 2024): You can ignore the `models--immich--app` folders. The important files are the `.onnx` and `.json` files. Make sure you have all of them and that the `.onnx` file sizes are correct - there might be an incomplete / corrupt download.
Author
Owner

@Haoke98 commented on GitHub (Jan 24, 2024):

Tanks a lot . I had fixed after download agian the model files and restarting the ML container.

@Haoke98 commented on GitHub (Jan 24, 2024): Tanks a lot . I had fixed after download agian the model files and restarting the ML container.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#2051
No description provided.