Reference

Models

The AI models Hubstruct uses, what each one does, and where it runs.

Hubstruct uses open models, run as they are, on your own hardware (or ours, in the cloud). None is trained on your media, and nothing you add leaves the machine to reach them.

ModelWhat it isUsed forServed by
Gemma 4 e2b or e4bA vision-language model from GoogleDescriptions, titles, reading text in picturesllama.cpp
EmbeddingGemma 2An embedding model for text and images, in one spaceThe document embedding, the image embedding, search queriesllama.cpp
d1 2BA small decision modelSmart tag confidences, NSFW scoresllama.cpp
PP-OCR detectorA text detectorFinding whether, and where, a picture has textvision
PP-OCR recogniserA text readerReading each piece of text where it is, so it can be selected on the picturevision
Face detectorsDetectors for real and drawn facesFinding faces, and telling real from drawnvision
ArcFaceA face embedding modelReal faces: telling people apartvision
CCIPA character embedding modelDrawn faces: telling characters apartvision

Plain image code, with no model, does the rest: sharp for thumbnails, colors, sharpness and perceptual hashes, and ffmpeg for video frames.

Gemma

Gemma writes each media's description and title, and reads its text once the detector has found some. Choose between two sizes in Settings → Processing:

  • e4b (the default, 8 billion parameters) is more accurate, and better with small or stylized lettering.
  • e2b (5.1 billion) is faster and lighter.

EmbeddingGemma

EmbeddingGemma turns text and pictures into vectors in one shared space, so a search's words can be compared with a picture's pixels, and a picture with a description. Hubstruct makes two per media:

  • the image embedding, of the pixels alone (the visual step), for look searches and duplicates;
  • the document embedding, of all the media's text with its picture (the embedding step), for everything else.

d1

d1 is a classifier: for each question (does this tag fit? is this NSFW?) it gives the probability of yes. Hubstruct asks all of a media's smart tags in one request, over one reading of it, and a GIF or video as a short clip the model watches through, so it's one judgment of the clip. It runs on the models server beside Gemma and EmbeddingGemma, started when tagging needs it.

Faces

Real and drawn faces are found by separate detectors and embedded by separate models, ArcFace for real faces and CCIP for drawn ones, and are only ever compared with their own kind. Faces too blurry to recognize are left out before embedding.