immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
52.03k stars 2.76k forks source link

Cache Directory Does Not Exist, CLIP model - Unraid #11318

Open OfficiallyCrazy opened 3 months ago

OfficiallyCrazy commented 3 months ago

The bug

I tried to install the some of the CLIP models but I get this error. I have read other issues both opened and closed but the issues I fond was over 1 year ago. I assume that it has something to do with cache permission. But i don't know where this folder is meant to exist.

I am able to restore the setting to the default and it works. But it doesn't when I try any other CLIP models.

The OS that Immich Server is running on

UNRAID

Version of Immich Server

v1.109.2

Version of Immich Mobile App

N/A

Platform with the issue

Your docker-compose.yml content

Installation direct from Unraid

Your .env content

Not sure what that is.

Reproduction steps

1. Try to install a CLIP model provided from IMMICH website
2. Run Smart Search
3. Open Logs
...

Relevant log output

[07/23/24 11:45:11] INFO     Downloading visual model 'RN50__openai'. This may  
                             take a while.                                      
[07/23/24 11:45:39] WARNING  Failed to load visual model 'RN50__openai'.        
                             Clearing cache.                                    
[07/23/24 11:45:39] INFO     Downloading visual model 'RN50__openai'. This may  
                             take a while.                                      
[07/23/24 11:45:39] WARNING  Attempted to clear cache for model 'RN50__openai', 
                             but cache directory does not exist                 
[Nest] 233  - 07/23/2024, 11:45:39 AM   ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request '{"clip":{"visual":{"modelName":"immich-app/RN50__openai"}}}' failed with status 500: Internal Server Error
[Nest] 233  - 07/23/2024, 11:45:39 AM   ERROR [Microservices:JobService] Error: Machine learning request '{"clip":{"visual":{"modelName":"immich-app/RN50__openai"}}}' failed with status 500: Internal Server Error
    at MachineLearningRepository.predict (/app/immich/server/dist/repositories/machine-learning.repository.js:22:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MachineLearningRepository.encodeImage (/app/immich/server/dist/repositories/machine-learning.repository.js:42:26)
    at async SmartInfoService.handleEncodeClip (/app/immich/server/dist/services/smart-info.service.js:91:27)
    at async /app/immich/server/dist/services/job.service.js:148:36
    at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 233  - 07/23/2024, 11:45:39 AM   ERROR [Microservices:JobService] Object:
{
  "id": "4c2fdcd0-517a-454a-8179-0472eaf382ec"
}

[07/23/24 11:46:07] WARNING  Failed to load visual model 'RN50__openai'.        
                             Clearing cache.                                    
[07/23/24 11:46:07] WARNING  Attempted to clear cache for model 'RN50__openai', 
                             but cache directory does not exist                 
[Nest] 233  - 07/23/2024, 11:46:07 AM   ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request '{"clip":{"visual":{"modelName":"immich-app/RN50__openai"}}}' failed with status 500: Internal Server Error
[Nest] 233  - 07/23/2024, 11:46:07 AM   ERROR [Microservices:JobService] Error: Machine learning request '{"clip":{"visual":{"modelName":"immich-app/RN50__openai"}}}' failed with status 500: Internal Server Error
    at MachineLearningRepository.predict (/app/immich/server/dist/repositories/machine-learning.repository.js:22:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MachineLearningRepository.encodeImage (/app/immich/server/dist/repositories/machine-learning.repository.js:42:26)
    at async SmartInfoService.handleEncodeClip (/app/immich/server/dist/services/smart-info.service.js:91:27)
    at async /app/immich/server/dist/services/job.service.js:148:36
    at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 233  - 07/23/2024, 11:46:07 AM   ERROR [Microservices:JobService] Object:
{
  "id": "3e1a17c4-6119-4c83-b27c-97553d92a734"
}

[Nest] 210  - 07/23/2024, 11:46:57 AM     LOG [Api:SystemConfigService~lhrbcksl] LogLevel=log (set via system config)
[Nest] 210  - 07/23/2024, 11:46:57 AM     LOG [Api:SystemConfigService~lhrbcksl] LogLevel=log (set via system config)
[Nest] 210  - 07/23/2024, 11:46:57 AM     LOG [Api:MapRepository~lhrbcksl] Initializing metadata repository
[Nest] 210  - 07/23/2024, 11:46:57 AM     LOG [Api:MetadataService~lhrbcksl] Initialized local reverse geocoder
[Nest] 233  - 07/23/2024, 11:46:57 AM     LOG [Microservices:SystemConfigService] LogLevel=log (set via system config)
[Nest] 210  - 07/23/2024, 11:46:57 AM     LOG [Api:SearchRepository~lhrbcksl] Dimension size of model ViT-B-32__openai is 512, but database expects 1024.
[Nest] 210  - 07/23/2024, 11:46:57 AM     LOG [Api:SearchRepository~lhrbcksl] Updating database CLIP dimension size to 512.
[Nest] 210  - 07/23/2024, 11:46:57 AM     LOG [Api:SearchRepository~lhrbcksl] Successfully updated database CLIP dimension size from 1024 to 512.
[Nest] 210  - 07/23/2024, 11:46:57 AM     LOG [Api:SystemConfigService~lhrbcksl] LogLevel=log (set via system config)
[07/23/24 11:47:05] INFO     Loading visual model 'ViT-B-32__openai' to memory  
[07/23/24 11:47:05] INFO     Setting execution providers to                     
                             ['CPUExecutionProvider'], in descending order of   
                             preference

Additional information

No response

danieldietzler commented 1 month ago

Hey, is this still an issue?

Michael-XKCD commented 1 month ago

Same issue here.