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

[BUG] Can not search contents eventhough the models are downloaded by manul #4839

Closed
1 of 3 tasks
Linjianfengccc opened this issue Nov 4, 2023 · 15 comments
Closed
1 of 3 tasks

Comments

@Linjianfengccc
Copy link

Linjianfengccc commented Nov 4, 2023

The bug

The immich web returens 500 code in seconds when I try to search some contents, from maching_learning logs, it seems to be failure when downloading CLIP. I have read the thread [](#4117 (comment)), follow the suggestion of @alextran1502 to download them and copy to volume path, but it's stiill not working. Once I start the machine_learning service and search for something, it starts to fetch the model without recgonizing the exisiting files, once the download fails, it will clean the cache path and retries to download.

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.84.0

Version of Immich Mobile App

v1.82.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

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
    depends_on:
      - redis
      - database
      - typesense
    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:
      - redis
      - database
      - typesense
    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
    restart: always
    env_file:
      - .env


  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    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

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    ports:
      - 8283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/nas/immich_data

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

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=some-random-text
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=immich_redis

Reproduction steps

1. Stop machine_learning
2. cp model folders(facial-recognition, clip, image-classification) to /var/lib/docker/volumes/docker_model-cache/_data
3. Start machine_learning
4. Search some content in web

Additional information

image

@Linjianfengccc
Copy link
Author

Supplement:
I degrade the version to v1.78.0 and now it's running well. So may it's something version relevant
image

@alextran1502
Copy link
Contributor

We change the type of models in 1.84 so you don't have to manually download the model anymore, it should automatically download the new model

@Linjianfengccc
Copy link
Author

@alextran1502 thank you for reply! Can I download it somewhere manully?I think I still need such a way, cuz the network in my country is isolated, and proxy in container is not doing well...

@alextran1502
Copy link
Contributor

Hello you can find the new models here https://huggingface.co/immich-app

@Linjianfengccc
Copy link
Author

@alextran1502 It's runnig well since I have downloaded new models, but now comming a new issue, no matter what I search, I always returns all photos(like following result), before this I have rerun all the machine_learning jobs . Someone seems to have same problem in an other issue:#4707
I am not sure whether is it out of expect, or maybe I lack of some configuration?
image

@alextran1502
Copy link
Contributor

Maybe you will need to run clip encoding again

@Linjianfengccc
Copy link
Author

yeah I did so, tried many times for all jobs, but still can't get correct result

@alextran1502
Copy link
Contributor

Which model were you using? Do you have any dogs?

@nodis
Copy link

nodis commented Nov 5, 2023

Hello you can find the new models here https://huggingface.co/immich-app

@alextran1502 My current CLIP model is "M-CLIP/XLM Robertsa Large Vit B-16Plus". After upgrading to 1.84, do I need to fill in a new name? "Immich app/XLM Robertsa Large Vit B-16Plus" ro "XLM Robertsa Large Vit B-16Plus"? thanks

@alextran1502
Copy link
Contributor

@nodis yes

@nodis
Copy link

nodis commented Nov 5, 2023

@nodis yes

@alextran1502 Can you tell me which name to fill in, please? "Immich app/XLM Robertsa Large Vit B-16Plus" ro "XLM Robertsa Large Vit B-16Plus"?

@Linjianfengccc
Copy link
Author

@alextran1502 my clip model is ViT-B-32__openai as before, which is downlaoded from https://huggingface.co/immich-app.
There is no dogs in my album, two cat pics are all I uploaded

@alextran1502
Copy link
Contributor

alextran1502 commented Nov 5, 2023

@Linjianfengccc Right so this is expected, we return the most relevant results. Since there are only two photos in the whole album, it will return those two

@Linjianfengccc
Copy link
Author

hi @nodis May I know how did you use another CLIP model? I didn't find any config to do so

@Linjianfengccc
Copy link
Author

@alextran1502 icic, thanks so much for your replies

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