How to Search Your Photos and Videos With a Sentence for Free With Mistral Clipstral

You have 40,000 photos on your phone. Somewhere in there is the photo of your grandmother laughing at the birthday table, the one with the yellow cake and the dog asleep under it. You remember the scene perfectly. You have no idea what the file is called, what folder it is in, or what year you took it. So you scroll. You scroll for ten minutes, past screenshots and receipts and duplicates, and you give up. The photo is still there. You just cannot ask for it.

On 30 November 2026, Mistral AI released a free open model that changes that search from scrolling to asking. It is called Mistral Multimodal Embed, codename Clipstral. You type a sentence, "grandmother laughing at the birthday table with the yellow cake", and it finds the photo. No tags, no folders, no filenames, no API key, no per-query bill. It runs on your own computer, even on a CPU, and it works on videos too, plus it understands queries in many languages, not just English.

Before the tutorial, the honest catches, because three of them change what you should expect. First, Clipstral is an embedding model, not a chatbot. It does not write answers, it only finds things. It turns a sentence and a photo into numbers and tells you which ones match. Second, a video is read as 16 frames from a short clip, not as a full movie, so a two-hour film is not one search, it is many short clips. Third, the model code ships inside the repository, so loading it needs trust_remote_code=True, which means you are running code from the model card. Read the modelling file first and pin a revision before you trust it in production. With those three in mind, here is the tutorial: what the model is, what you need, the install, the first search, four things to build with it, the numbers honestly, and the limits.

What is Clipstral, exactly?

Most search works on words. You type a word, the computer looks for that word in a filename or a tag. Your photos have no words in them, so that kind of search cannot see them. Clipstral works on meaning instead. It is a dual encoder, which is a fancy way of saying it has two readers, one for pictures and one for text, and both readers write their answers in the same language: a list of 1,024 numbers, called an embedding. A sentence and a photo that mean the same thing get lists of numbers that sit close together on that shared map. A sentence and a photo that mean different things land far apart. Search becomes a nearest-neighbour lookup: embed the sentence once, compare it with every photo you already embedded, and return the closest ones.

The model has three towers and 1.24 billion parameters in total. The vision tower is a 409 million parameter transformer that reads images at their native size and aspect ratio, so a tall phone photo and a wide landscape photo are both read as they are, not squashed into the same square. The video path adds a small 50 million parameter spatio-temporal encoder that links the frames of a clip together. The text tower is a 783 million parameter multilingual model with a 131,000 entry tokenizer and no fixed context limit, which is the part that matters for long captions: most open encoders cut your text off after 32 to 77 tokens, this one keeps reading.

That shared map is the whole trick, and it is why one model does four jobs. Text to image search: type a sentence, find the photo. Text to video search: type a sentence, find the clip. Visual search: give it a photo as the query and find similar photos, no words at all. Zero-shot classification: describe your categories in words, "beach", "receipt", "screenshot", "dog", and the model sorts your photos into them without any training. And dataset curation: find near-duplicates to delete, and find mismatched pairs, like a caption that does not match its image, to filter out.

It is free and open under the Apache 2.0 licence, and the weights are about 2.3 GB, which is small enough to download in minutes on a normal connection. There is no hosted API price published, and Mistral offers fine-tuning through its Forge platform, but the tutorial here needs no account and no payment of any kind. The model card and the GitHub repository are the two sources that matter, and every command below comes from them.

What you need

You need less than you think. A computer with Python 3.10 or newer, about 3 GB of free disk for the model and the libraries, and 20 to 30 minutes. A CPU works. The model card says the package is tested on CPU in float32 and on NVIDIA GPU in bfloat16, with Python 3.13 and Transformers 4.57 or newer, and one independent hands-on run indexed 27 example photos and 15 example videos end to end on a CPU. A GPU makes indexing a big library faster, but the tutorial runs on an ordinary laptop. You need no Mistral account, no API key, and no cloud service. Your photos never leave your machine, which is the point: the search runs locally, so your private library stays private.

One more thing before you start: decide which folder you will index. A small test folder is the right first step, maybe 50 photos and a few short clips, so you can check the results by eye before you point it at 40,000 files. The model works best on natural photos and videos, people, places, animals, objects, scenes. The model card is explicit that documents, OCR-heavy content and code are out of scope for this release, so do not expect it to read the text inside a scanned letter. For that job, use the Day 26 OCRia-nano-1 tutorial, which turns PDFs into clean text on a CPU.

Step 1: install it

There are two routes, and both are verified on the model card and the GitHub repository. The quick route is the Gradio demo, which gives you a search box in your browser with no code at all. Clone the repository, then run two commands from the repository root:

git clone https://github.com/mistralai/mistral-multimodal-embed.git
cd mistral-multimodal-embed
uv sync
uv run python app.py

Open http://localhost:7860 in your browser. One tab searches the example images and videos with text. The other tab classifies example photos by city, zero-shot, which is the fastest way to see the sorting trick work. The uv tool installs the right torch build for your platform automatically, CUDA on Linux, CPU-only on macOS and Windows, so plain uv sync is enough. If you do not have uv, install it from docs.astral.sh/uv first, it takes a minute.

The second route is the Python library, which is the one this tutorial uses, because it is the route that lets you search your own library. Create a fresh virtual environment, activate it, and install the pieces the quick start needs:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install torch transformers opencv-python-headless pillow numpy

On Windows, use .venv\Scripts\activate instead of the source line, and if you want the CPU-only torch build, add the PyTorch CPU index URL when you install torch. The card's quick start imports cv2, which is OpenCV, for reading video frames, plus Pillow for images and numpy for the frame sampling. That is the whole install. Nothing else is required, and nothing phones home.

Step 2: load the model and run your first search

This is the model card's own quick start, trimmed to the essentials. Save it as search.py and run it from any folder. It downloads three small example files from the GitHub repository, embeds three sentences and two example photos, and prints a similarity table that shows which sentence matches which photo:

import urllib.request
import torch
from PIL import Image
from transformers import AutoImageProcessor, AutoModel, AutoTokenizer

repo_id = "mistralai/mistral-multimodal-embed-1B"
assets = "https://raw.githubusercontent.com/mistralai/mistral-multimodal-embed/main/assets"
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.bfloat16 if device == "cuda" else torch.float32

model = AutoModel.from_pretrained(repo_id, trust_remote_code=True, dtype=dtype).eval().to(device)
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
processor = AutoImageProcessor.from_pretrained(repo_id, trust_remote_code=True)

texts = ["iconic windmill", "a gothic cathedral", "a statue in a sunny square"]
tok = tokenizer(texts, padding=True, return_tensors="pt")
with torch.inference_mode():
    text_features = model.get_text_features(tok.input_ids.to(device), tok.attention_mask.to(device))

image_paths = [urllib.request.urlretrieve(f"{assets}/images/image_0{i}.jpg", f"image_0{i}.jpg")[0] for i in (0, 1)]
images = [Image.open(path).convert("RGB") for path in image_paths]
pixel_values = [p.to(device=device, dtype=dtype) for p in processor(images)["pixel_values"]]
with torch.inference_mode():
    image_features = model.get_image_features(pixel_values)

print(image_features @ text_features.T)

The printed table is three rows, one per photo, and three columns, one per sentence. The biggest number in each row is the match. If the windmill photo scores highest on "iconic windmill", the model is working. Read that line again, because it is the whole product: image_features @ text_features.T, a dot product between two lists of 1,024 numbers, is the search. Everything else in this tutorial is just doing that same dot product at scale.

Now the trust_remote_code warning, in plain language. The model code ships with the weights, in a file called modeling_mistral_contrastive.py, and AutoModel runs that code when you load the model. That is normal for Hugging Face models with custom code, and it is also a real risk, because the code runs with your permissions. Two habits keep it safe. First, read the modelling file before you run it, it is short and readable, and check that it only defines the model. Second, pin a revision when you load it, so a future change to the repository cannot silently change the code you run. For a tutorial on your own photos, that is enough. For anything in production, that is the minimum.

Step 3: index your own photos, then ask in plain language

The example above embeds two photos. Your library works the same way, just in a loop. Walk your test folder, embed every photo once, save the embeddings to a file, and then any search is just embedding one sentence and comparing it with the saved list. Embed once, search many times: that is the architecture, and it is why the second search is instant even when the first indexing run takes a few minutes on a CPU.

Write your sentences the way you would describe the photo to a friend. "The dog asleep under the birthday table" beats "dog" because the extra words narrow the match. Try a sentence in your own language too. The tokenizer is multilingual, and on the XM3600 benchmark covering 36 languages, the model scored 59.7 on non-English queries against 57.8 in English, so a query in Bangla, Spanish or French is not a second-class query. The independent CPU test by Sulat on 1 December 2026 found the same thing in practice: the model tied Google's SigLIP2 on 25 short queries in eight languages, and it found the right item for three long captions that SigLIP2 could not see the end of. Treat that as one independent run, not a settled verdict, but it matches what the model card promises about long text.

Check your own results with a top-5 test. Pick five photos you know well, write one sentence for each, and run the five searches. If the right photo is in the top five results every time, the model understands your library. If a sentence misses, rewrite it with one concrete detail, a colour, an object, a place, and try again. The model reads meaning, not keywords, so "yellow cake" helps more than "birthday" repeated twice.

Four things to build with it

First, plain-language search, which is the tutorial you just ran. Point it at the test folder, then at the real library when you trust it. A photo app that lets you type "the beach at sunset with the red umbrella" and get the photo is the most useful thing you will build this week, and it is about thirty lines of code on top of the quick start.

Second, visual search. Give the model a photo as the query instead of a sentence, and it returns the photos that look most like it. Find every photo from the same trip, every photo with the same dog in it, every photo taken in the same place. No words needed, which is handy for the photos you cannot describe well.

Third, zero-shot sorting. Write your categories as sentences, "a receipt", "a screenshot", "a photo of a dog", "a photo of food", embed the sentences once, and sort every photo into the category it matches best. No training, no labelled data, no model fine-tuning. The demo tab that classifies photos by city is exactly this trick with city names as the categories. It is also the fastest way to clean a library: sort first, then delete the whole "screenshot" pile in one go.

Fourth, deduplication. Embed every photo, then compare each photo with every other photo. Two photos with almost identical embeddings are near-duplicates, even if one is cropped, resized or re-saved at a different quality. That is the dataset curation use the model card lists, and it is the boring job that saves real disk space: your phone takes three near-identical shots of every moment, and this finds them.

The numbers, honestly

Mistral compared Clipstral with 13 open-weight encoders up to 4 billion parameters, plus Qwen's 8 billion parameter model as a larger reference, under one zero-shot protocol across 37 benchmarks. On image retrieval it scored 80.2, against 77.5 for the Qwen3-VL-Embedding-2B, the closest rival at a similar size. On video retrieval it scored 64.0, against 61.9 for the same Qwen model. On image classification it scored 79.2 and on video classification 57.0, which puts it second among models its size, behind models 1.7 to 2 times bigger. Mistral's claim is that it is the best image and video retriever among open models up to 4 billion parameters. All of those numbers are Mistral's own, and none of them are independently verified, so treat them as the maker's scoreboard, not a settled verdict.

Say the counterpoint plainly, because the same table has it. The bigger Qwen3-VL-Embedding-8B beats Clipstral on image retrieval, 82.7 against 80.2, and on video retrieval, 66.2 against 64.0, and it leads classification too. Meta's PE-Core-G beats it on image classification, 81.6 against 79.2. The honest reading is that Clipstral wins its weight class on retrieval and loses to bigger models, which is exactly what you would expect from a 1.24 billion parameter model against an 8 billion parameter one. The reason to pick it is not that it beats everything. It is that it beats everything its size, it runs on a CPU, it is free, and it is small enough to live on your own machine.

The long-caption number is the one that matters most for real use. On a long-caption retrieval suite, Clipstral scored 71.2, against 69.8 for the Qwen 2B model and 69.7 for EmbeddingGemma 2. That is the number behind the Sulat finding above: when your sentence is long and specific, this model keeps reading it instead of cutting it off. Short queries are a tie with the best alternatives. Long, specific queries are where it pulls ahead.

The limits, stated plainly

Video is the biggest limit. A video is embedded from 16 evenly spaced frames, and training used clips of up to about one minute. A two-hour film is not one embedding, it is a hundred short clips, and the model does not remember what happened between them. If your use is home videos, split each video into one-minute clips first, index the clips, and search those. If your use is a film archive, you need segment-level aggregation on top, which is a bigger project.

The second limit is that it generates nothing. It finds, it sorts, it matches. It does not describe a photo, answer a question about one, or write a caption. If you want a chatbot that talks about your photos, pair this with a vision-language model, for example by using Clipstral to find the five best photos and a chat model to describe them. That combination is a real product, and the retrieval step is the part this model solves.

The third limit is scale. Your library of 40,000 photos is fine on a CPU, just slow to index the first time, a few hours at worst, and instant to search after that. A library of millions of photos needs a GPU for indexing and a vector database, like FAISS or Qdrant, to hold the embeddings, and Mistral's own card says large collections index on a single H100, which is the enterprise scale, not the home scale. If you outgrow a saved file of embeddings, that is the moment to add a vector database, not before.

And the fourth limit is scope. The model targets natural images and videos. Documents, OCR-heavy content and code are out of scope for this release, so do not point it at a folder of scanned letters and expect it to read them. Use the Day 26 OCRia tutorial for documents, the Day 27 AutoClip tutorial if your problem is cutting long videos into clips, and the Day 5 Ollama tutorial if you want a local chat model to pair with the search.

FAQ

Is Clipstral really free?
Yes. The weights are open under the Apache 2.0 licence, the code is on Hugging Face and GitHub, and there is no account, no API key and no per-query bill. Your only costs are the download and the electricity to run it. Mistral offers paid fine-tuning through its Forge platform, but the tutorial here uses none of that.

Will it run on my laptop without a GPU?
Yes. The model card says the package is tested on CPU in float32 and on NVIDIA GPU in bfloat16. Indexing is slower on a CPU, a few minutes for a test folder, longer for a big library, but searching is instant once the embeddings are saved. The weights are about 2.3 GB, so you need about 3 GB of free disk.

Can it search videos, or only photos?
Both. A video is read as 16 evenly spaced frames from a short clip, up to about a minute long. Longer videos need to be split into clips first. The same sentence search works on clips as on photos.

Does it understand languages other than English?
Yes. The text tower is multilingual with a 131,000 entry tokenizer and no fixed context limit. On the XM3600 benchmark in 36 languages it scored 59.7 on non-English queries, slightly above its 57.8 in English. Try your own language and check the top five results.

Is trust_remote_code=True safe?
It runs code from the model repository on your machine, so read the modelling file first and pin a revision before you use it in anything serious. For a tutorial on your own photos, reading the file and pinning the revision is enough. Do not run it blind in production.

What is the difference between this and Google Photos search?
Google Photos search runs on Google's servers, on Google's models, with your photos uploaded to Google. Clipstral runs on your machine, on a model you downloaded, with your photos never leaving your disk. The tradeoff is that you do the indexing yourself, and Google's service is more polished. The gain is privacy and no subscription.

Can it find duplicates?
Yes, and that is one of its listed uses. Embed every photo, compare each one with the others, and near-identical embeddings mean near-duplicate photos, even if one is cropped or re-saved. Delete the extras and keep the best copy.

Sources

Mistral Multimodal Embed model card, Hugging Face (mistralai/mistral-multimodal-embed-1B) (https://huggingface.co/mistralai/mistral-multimodal-embed-1B)
Mistral Multimodal Embed GitHub repository, Gradio demo and example notebook (https://github.com/mistralai/mistral-multimodal-embed)
Clipstral paper, Mistral AI, 2026 (https://www.alphaxiv.org/abs/2611.clipstral-mistral-multimodal-embed-1b)
Mistral AI blog post on Clipstral, linked from the model card (https://huggingface.co/mistralai/mistral-multimodal-embed-1B)
Sulat, independent CPU test of Clipstral vs SigLIP2, 1 December 2026 (no direct link, found via search on 1 December 2026)

Keep reading on RiseMe

How to Turn Any PDF Into Clean Text for Free With OCRia-nano-1
How to Turn Long Videos Into Viral Shorts for Free With AutoClip
Run AI on Your Own PC: Ollama Tutorial

Post a Comment