Repository navigation
[Feature] Pre-warm Clip ML Model on Client App Open #27407
Closed
MoHamza1
started this conversation in
Feature Request
Replies: 1 comment
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have searched the existing feature requests, both open and closed, to make sure this is not a duplicate request.
The feature
Huge thanks to everyone who has built and maintains Immich, I've only recently started home-labbing in no small part because of immich. The hardware-accelerated search experience (especially with Intel Arc GPUs via OpenVINO) is genuinely impressive and made my deployment much cleaner than with my nvidia card, and the project as a whole keeps getting better with every release. 🙌
The Idea
Would it be possible to have the iOS (and Android) app fire a lightweight "warm-up" ping to the ML service the moment the app is opened or brought to the foreground?
I know I can configure:
MACHINE_LEARNING_PRELOAD__CLIPand setMODEL_TTL=0, however as I'll explain below, I think this should still be considered.The Problem Today
When the ML container hasn't served a request for a while, the CLIP model gets evicted from VRAM. The next smart search request then has to:
This means the first search after any idle period has noticeably higher latency — which feels a bit jarring compared to how snappy everything else is, (especially when I'm showing the app off to potential converts 😉)
Proposed Solution
When the mobile app opens (or comes back to the foreground), send a cheap background request to the ML service to trigger model loading before the user actually performs a search. By the time they've navigated to the search screen, the model is already warm in VRAM.
This could be implemented in a few ways:
/api/ml/warmupendpoint that the app calls silently on launchWhy It Matters
For self-hosters running hardware-accelerated setups with limited or shared VRAM (e.g. Intel Arc B580, entry-level NVIDIA cards), the cold-start penalty is the single biggest friction point in an otherwise excellent search experience.
I use
ViT-SO400M-16-SigLIP2-384__webli, which performs exceptionally well on my hardware however a high or -1 TTL is too big of a commitment for me to make given I also host other hardware accelerated services.Baking this in would make smart search feel truly instant for everyone, regardless of hardware.
Would love to see this considered for a future release; even as an opt-in setting. Happy to discuss or help test!
Thanks again for everything you all do!
Platform
All reactions