Model reference · open weights
face is an open-weight embedding model from desert-ant-labs. face (BF16) weighs 26 MB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the desert-ant-labs/face model card, 2026-12-01
What it is
| Released by | desert-ant-labs |
|---|---|
| Released | 2026-11-05 |
| VRAM | 26 MB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
From the model card
Find people in photos, on device.
On-device face matching across a photo library or through a video.
| Platforms | iOS, macOS, tvOS, visionOS, Android, Linux, Windows, Browser, Node |
| Weights | v1.0.0 |
| Demo | https://desertant.com/models/face/ |
Face finds the faces in a photo and gives each one a faceprint: 128 numbers that point the same way for the same person. With stored faceprints you can tell whether two faces are one person, find one person in a library from a selfie, and group a library into people, without the model. To crop, blur or count faces, FaceDetector finds them without faceprints and downloads the detector alone. No face leaves the device.
Swift (requirements)
.package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core.git", from: "6.0.0")
Then add the Face product to your target.
Kotlin (requirements)
implementation(platform("ai.desertant:bom:6.0.0"))
implementation("ai.desertant:face")
JavaScript (requirements)
npm i @desert-ant-labs/face @litertjs/core # browser
npm i @desert-ant-labs/face # Node, prebuilt native core
faces(in:) finds the faces in a photo and gives each one a faceprint. FaceLibrary groups faceprints into people and keeps the names and corrections the user makes. The library and the comparisons run without the model.
import Face
let face = Face()
let faces = try await face.faces(contentsOf: photoURL) // or UIImage, NSImage, CGImage, Data
faces.first?.box // in 0...1 of the image, origin top left
faces.first?.faceprint // Codable, or .data (512 bytes) for your own database
var library = FaceLibrary()
library.add(faces, photo: asset.id, date: asset.creationDate)
for person in library.people(.prominent) { // or .all
show(person.name, library.face(person.keyFace)?.box)
}
library.name(person.id, "Noor")
library.confirm(faceID, is: person.id) // "This is Noor"
library.reject(faceID, from: person.id) // "This is not Noor"
library.merge(other.id, into: person.id) // "These are the same person"
library.newPerson(from: faceID, named: "Ana") // "This is Ana", someone new
library.suggestions(for: person.id) // "Is this also Noor?"
library.remove(photo: deletedAsset.id)
library.person(for: newFace.faceprint)?.name // "Noor", or nil for someone new
The SDK decodes files and Data upright, following their EXIF orientation. Face also finds faces turned sideways or upside down in the photo, and their faceprints match the same faces upright. Canceling the calling task stops the analysis and throws CancellationError. Create one Face and reuse it.
On Linux and Windows, pass decoded pixels:
let pixels = try ImagePixels(width: w, height: h, rgba: bytes)
let faces = try await face.faces(in: pixels)
import ai.desertant.face.Face
Face(context).use { face ->
val library = face.library() // or face.library(saved), face.library(rows, names)
library.add(face.faces(bitmap), photo = assetId, date = takenAt)
for (person in library.people(prominent = true)) show(person)
library.name(person.id, "Noor")
library.reject(faceId, person.id) // "This is not Noor"
library.newPerson(faceId, "Ana") // "This is Ana", someone new
library.person(newFace.faceprint)?.name // "Noor"
val saved = library.save() // JSONObject
}
import { Face } from "@desert-ant-labs/face"; // browser
// import { Face } from "@desert-ant-labs/face/native"; // server-side Node
const face = await Face.load();
const library = await face.library(); // or face.library(saved)
await library.add(await face.faces(image), photoId, { date });
const people = await library.people({ prominent: true });
await library.name(people[0].id, "Noor");
const saved = await library.save(); // JSON
face.dispose();
In the browser, image can be anything createImageBitmap accepts or an ImageData. In Node, pass decoded, upright pixels as { data, width, height }.
FaceDetector finds the faces and their five landmarks, and downloads the detector alone: 7.6 MB on Apple platforms, 15 MB elsewhere, against 26 MB and 52 MB for Face. Face and Eye use the same detector, and an app that uses more than one of them downloads it once.
let detector = FaceDetector()
for face in try await detector.faces(contentsOf: photoURL) { // [FaceDetection]: box, landmarks, confidence
blur(face.box)
}
FaceDetector(context).use { detector -> detector.faces(bitmap).forEach { blur(it.box) } }
import { FaceDetector } from "@desert-ant-labs/face";
const detector = await FaceDetector.load();
for (const { box } of await detector.faces(image)) blur(box);
FaceDetector finds the same faces as Face when given the same options. A DetectedFace from Face gives its FaceDetection as detection.
The library's state is faces, one FaceRecord per face, and names. Every platform runs the same Swift FaceLibrary, so a library saved on one platform loads on any other and groups faces the same way.
To save the whole library, encode it as JSON (Codable in Swift, save() in Kotlin and JavaScript) and decode it at launch.
To keep faces in your own database, store each FaceRecord as one row of a faces table (id, photo, date, box, confidence, `faceprint.dat
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
How it works