Self-Hosting · Photos

Immich Machine Learning: Models, GPU Acceleration and Remote Workers

The features that make Immich feel like Google Photos — searching for “beach sunset” or a person’s name and getting the right pictures — come from a separate container that many installs treat as a black box: immich-machine-learning. It detects faces, reads text in images, and turns every photo into numbers a search can compare. This guide opens the box. It covers what the container does, how to choose its models (and what changing them commits you to), the five hardware acceleration backends the documentation supports, how to borrow a stronger machine’s GPU over your network, and the concurrency settings that actually speed up a first import. Immich here is v3.4.2, released November 18, 2026.

Published Nov 23, 2026

What the machine learning container does

Immich splits its intelligence into a dedicated service. The main server reaches the ML container at http://immich-machine-learning:3003 inside the Compose network, and sends it three kinds of work. Smart Search runs a CLIP model that embeds images and text into the same mathematical space, which is what makes free-text search work — you type words, Immich embeds the words, and the closest image embeddings win. Face Detection finds faces in each photo and embeds them. OCR reads text inside images so screenshots and documents become searchable.

One job that sounds like machine learning is not the container’s: facial recognition clustering — deciding which detected faces belong to the same person — runs on the server against the database, using the detection embeddings. That distinction matters later, for remote ML and for concurrency. Models are downloaded the first time they are used, into the model-cache volume, and once downloaded the container works fully offline. The whole stack’s documented floor is 6 GB of RAM (8 GB recommended) and 2 CPU cores (4 recommended); with machine learning disabled entirely, Immich can run in 4 GB.

Choosing models: the face model

The default facial recognition model is buffalo_l, from the InsightFace family, and it is the right default for most libraries. A smaller sibling, buffalo_s, exists for constrained systems — the documentation’s own tip is to consider it when the first import of a large library keeps the CPU saturated. Switching face models is not a free experiment: it requires re-running Face Detection on all assets, because every stored embedding came from the old model.

Three tuning values shape how faces become people, with defaults of 0.7 for the minimum detection score, 0.6 for the maximum recognition distance, and 3 for the minimum face count. The documentation’s guardrails are plain: do not take the detection score below 0.5, and keep the recognition distance between 0.3 and 0.7. The minimum count of 3 is the core-point threshold — a new Person is only created once three similar faces exist — which is why a person who appears in exactly two photos may never get a named entry, and why lowering that number trades tidiness for coverage.

Choosing models: the CLIP model behind Smart Search

The default CLIP model is ViT-B-32__openai. Immich’s documentation publishes a benchmark table for the supported models — ordered from larger and higher-quality down to smaller and faster — measured on a specified desktop processor with no acceleration, and the spread is real: the largest SigLIP 2 models in the table score noticeably higher English search recall than the default, at several times the memory footprint. Those figures are the documentation’s benchmarks on its stated hardware, not a promise for your NAS; treat them as a ranking, not a stopwatch.

Households searching in more than one language should choose deliberately. The nllb- models expect the query in the language set in your account and suit a single non-English language; the xlm- and SigLIP 2 models are language-agnostic and are the better fit for mixed-language searching. Two limits apply to every choice. Custom CLIP models are not supported — only the models on Immich’s own list can be used. And changing the CLIP model requires re-running Smart Search on all assets, so pick with the re-index cost in mind: on a big library, that is hours of compute, not minutes.

Hardware acceleration: five backends, labeled experimental

The documentation is upfront that ML hardware acceleration is still experimental, and it supports exactly five backends. There is no generic “any GPU works” option, and no Apple Silicon or Metal backend is documented.

BackendHardwareWhat to know before you start
CUDANVIDIA GPUs, compute capability 5.2 or newerNeeds driver 545 or newer (CUDA 12.3) and the NVIDIA Container Toolkit on Linux. The documentation calls CUDA the most reliable backend, and notes some models are incompatible with other backends.
ROCmAMD GPUs supported by ROCmThe image is large — budget at least 35 GiB of free disk. Some unsupported cards need the HSA_OVERRIDE_GFX_VERSION workaround, and idle power can stay high for roughly five minutes until models unload.
OpenVINOIntel GPUs — Iris Xe and ArcIntegrated GPUs are more likely to hit issues, especially on older processors or low-memory systems. Counterintuitively, OpenVINO uses more RAM than running on CPU — it buys speed, not memory savings.
ARM NNArm boards with a Mali GPUNeeds /dev/mali0 and the closed-source libmali library. It exists for model compatibility; the documentation states it does not accelerate search latency, though Smart Search jobs still run on it.
RKNNRockchip RK3566, RK3568, RK3576 and RK3588 onlyNeeds the RKNPU driver at 0.9.8 or newer. Keep MACHINE_LEARNING_WORKERS at 1 and raise job concurrency instead — the documentation suggests 4 to 6.

The setup pattern is the same for all five. Download the hwaccel.ml.yml override file and place it beside your docker-compose.yml. Append the backend to the ML image tag — for example -cuda or -openvino after the version. In the override file, uncomment the extends block and change the service it extends from cpu to your backend. Then redeploy only the ML container. No completed ML jobs need redoing afterwards; acceleration changes how fast new work runs, not the results already stored.

Two clarifications save confusion. Multiple GPUs are supported through MACHINE_LEARNING_DEVICE_IDS with one worker per device, but each GPU must hold all of the models on its own — a model cannot be split across cards. And none of this touches video transcoding: that acceleration lives in the immich-server container, uses a different override file (hwaccel.transcoding.yml), and is covered by the separate transcoding settings. A fast ML container does nothing for slow video conversions, and the reverse is also true.

Remote machine learning: borrow a stronger machine

If the server is a small NAS but a desktop in the house has a real GPU, the ML container can live on the desktop instead — or as well. Run only immich-machine-learning on the stronger machine, publish its port 3003, then in Administration → Settings → Machine Learning Settings, add the remote address (for example http://192.168.1.50:3003) as an additional URL.

Add the remote URL rather than replacing the local one. URLs are tried in order, one at a time — there is no load balancing — and a machine that does not respond is skipped temporarily, so the local container remains a working fallback when the desktop is asleep. Only replace the URL outright if local processing must never happen, in which case the local ML service can come out of the Compose file. Smart Search and Face Detection will use the remote machine; facial recognition clustering will not, because it is a server-side database job, not an ML container job. The server sends image previews to the remote container, which does not store them or tie them to a user.

The security boundary must be stated as plainly as the documentation states it: the ML container has no security measures whatsoever — no authentication, nothing. Keep port 3003 on your LAN or reachable only over a private VPN such as Tailscale, and never expose it to the internet. Finally, keep the remote container on the same Immich version as the server and update them together; the documentation warns that version mismatches may cause bugs and instability.

Concurrency: throughput, not magic

Job concurrency lives in Administration → Settings → Job Settings, per job type — Smart Search, Face Detection, thumbnail generation, video transcoding and the rest each have their own value. Raising concurrency improves throughput: a bulk import finishes sooner because more items are processed side by side. It does not reduce the latency of any individual job, so it will not make a single search feel faster. Two specific cautions come from the documentation. Do not raise thumbnail concurrency beyond your available CPU cores; it hurts API responsiveness and gains nothing. And facial recognition concurrency cannot be changed at all — the clustering implementation is sequential, so that job takes the time it takes, which is one more reason the first big import is best left running overnight.

Official documentation and references

Frequently asked questions

Does Immich machine learning need a GPU?

No. The ML container runs on CPU by default, and for steady-state use — a handful of new photos a day — CPU is fine. A GPU matters most for the first import of a large library. Acceleration is officially experimental and supports exactly five backends: CUDA, ROCm, OpenVINO, ARM NN and RKNN.

What happens if I change the CLIP or face model?

You re-run the corresponding job on everything. Changing the CLIP model requires re-running Smart Search on all assets, and changing the face model requires re-running Face Detection on all assets, because the stored embeddings came from the old model. On a large library that is a significant amount of compute, so choose models deliberately rather than experimenting casually.

Can I run Immich’s machine learning on a different computer?

Yes. Run only the immich-machine-learning container on the stronger machine, publish port 3003, and add its URL in the Machine Learning settings — as an additional URL, so the local container stays as a fallback. Keep both on the same Immich version, and never expose port 3003 to the internet: the container has no authentication at all, so it belongs on a LAN or a private VPN only.

Why is facial recognition still slow with a GPU?

Because the part that groups faces into people — the clustering — does not run in the ML container or on the GPU. It runs on the server against the database, its implementation is sequential, and its concurrency cannot be raised. The GPU accelerates detecting and embedding faces; the grouping afterwards takes the time it takes.

Does ML acceleration also speed up video transcoding?

No. They are separate systems in separate containers: machine learning acceleration is configured for the immich-machine-learning container with hwaccel.ml.yml, while video transcoding acceleration belongs to the immich-server container and uses hwaccel.transcoding.yml. Setting up one does nothing for the other.

Related guides