Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The machine learning models cannot be downloaded. #6616

Closed
1 of 3 tasks
Haoke98 opened this issue Jan 24, 2024 · 8 comments
Closed
1 of 3 tasks

The machine learning models cannot be downloaded. #6616

Haoke98 opened this issue Jan 24, 2024 · 8 comments

Comments

@Haoke98
Copy link

Haoke98 commented Jan 24, 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

@alextran1502
Copy link
Contributor

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

@Haoke98
Copy link
Author

Haoke98 commented Jan 24, 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

@alextran1502
Copy link
Contributor

This is what I have for my volume
image

@Haoke98
Copy link
Author

Haoke98 commented Jan 24, 2024

Thansk you a lot. 🤓

@Haoke98
Copy link
Author

Haoke98 commented Jan 24, 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.

@alextran1502
Copy link
Contributor

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

@mertalev
Copy link
Contributor

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.

@Haoke98
Copy link
Author

Haoke98 commented Jan 24, 2024

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

@Haoke98 Haoke98 closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants