I
Immich2y ago
Joey

Unraid failed to download models

25 Replies
Joey
JoeyOP2y ago
whenever i try to search i get internal error 500
Alex Tran
Alex Tran2y ago
Is this the default model?
Joey
JoeyOP2y ago
default template yea
davak72
davak722y ago
@Alex I was about to report this same issue. Also running defaults on UnRAID
Joey
JoeyOP2y ago
@Alex
sogan
sogan2y ago
Hi, no need to ping Alex. There are other people here who can help. This is caused by the issue described here https://github.com/immich-app/immich/issues/4002 and will be fixed in the next release.
GitHub
[BUG] Machine Learning container fails to start after upgrading to ...
The bug I upgraded Immich and the machine learning container fails to start. Output of sudo docker logs -f immich_machine_learning [09/06/23 10:35:59] INFO Booting worker with pid: 4585 [09/06/23 1...
davak72
davak722y ago
My apologies for pinging Alex! Oh, and it looks like you provided the solution/workaround in the issue comments. Thank you! I'll give it a try
Alex Tran
Alex Tran2y ago
No worry, I am on vacation so I am not very active at the moment
davak72
davak722y ago
Hey, is machine-learning/start.sh located somewhere in the docker image for immich, or does it get absorbed during the build process somehow? The file download from https://clip-as-service.s3.us-east-2.amazonaws.com/models-436c69702d61732d53657276696365/onnx/ViT-B-32/visual.onnx is actually successful, but the error happens anyway. Is there a flag I can set in the DB to tell immich that we have the file?
sogan
sogan2y ago
The download only happens if the file doesn’t exist at the cache folder when it gets a request. My guess for what might be happening is that it downloads to a temp file that it renames to the download path on completion. If this file is corrupt, it might not be deleted when it tries to download the model again, and later attempts fail because it tries to resume the download with a corrupt file. This is just a guess, though. start.sh is in the working directory of immich-machine-learning. There’s a related PR that improves downloading beyond the timeout fix, but you can probably fix this by setting the timeout to a high value like 600s and deleting the model cache volume.
Joey
JoeyOP2y ago
My bad for @
davak72
davak722y ago
Yeah, the temp file is visual.onnv.part or something, but deleting it didn’t work, nor did manually placing the fully downloaded file into that directory. Ok, Yeah, I saw the PR and the path, but I don’t see it within the immich container for some reason. Do you know what the path to the working directory might look like?
sogan
sogan2y ago
It should be at /usr/src/app/start.sh Can you confirm that the path for it is /cache/clip/ViT-B-32__openai/visual.onnx?
davak72
davak722y ago
Ah, so on my UnRaid OS, it's mnt/user/appdata/immich-machine-learning/clip/ViT-B-32__openai On the docker image, there is no /cache directory Hmm, so /usr/src/ appears to be empty...
martabal
martabal2y ago
If you use the AIO image it should be in /config/machine-learning
davak72
davak722y ago
Ah, yes! The path is /config/machine-learning/clip/ViT-B-32__openai/visual.onnx
sogan
sogan2y ago
So if you have this file in the path it's looking for ($MACHINE_LEARNING_CACHE_FOLDER/clip/ViT-B-32__openai/visual.onnx), you should restart the container and run a CLIP job. It should load without any errors. If it still doesn't work, I'd suggest deleting the model cache volume, making sure you're on the latest release (1.78) and trying again.
davak72
davak722y ago
Ah, thanks! I'll give that a try. I hadn't tried running a CLIP job
Joey
JoeyOP2y ago
Got it working ty
davak72
davak722y ago
That worked great, thank you!!! The search is so amazing!
sogan
sogan2y ago
Glad to hear it!
un1c0rn
un1c0rn2y ago
@davak72 would you be able to share the visual.onnx and textual.onnx that you downloaded? The links for those recently expired and I can't find any compatible models. Jina-ai doesn't appear to publish their pt to onnx conversion method, either. https://github.com/immich-app/immich/issues/4117 https://github.com/jina-ai/clip-as-service/issues/931
GitHub
[BUG] Search for anything ==> Immich fails to download textual.onnx...
The bug When I search for anything in immich, I get generic errors in the UI. In docker logs, I can see that something is trying to download Downloading clip model 'ViT-B-32::openai' ... an...
davak72
davak722y ago
Np, just give me a few minutes Shooot, I’m sorry, I totally spaced on this. Still interested?
un1c0rn
un1c0rn2y ago
Oh np the S3 bucket came back online. Thanks anyway!
davak72
davak722y ago
Ah, perfect

Did you find this page helpful?