generate, chat and serve take images, on the CPU and on the GPU. The model needs its projector file (an mmproj
GGUF). The general flag reference is in USAGE.md.
| Model | Checked with |
|---|---|
Qwen3-VL projectors (qwen3vl_merger) |
qwen3.5-2b with qwen3.5-2b-mmproj.gguf, and the Qwen3.6-35B-A3B mmproj |
Qwen3.8 Flash-Next (qwen4exp, same projector, projection_dim 2560) |
unsloth's UD-IQ2_XS with mmproj-F16.gguf |
Gemma 4 (gemma4v) |
the gemma-4-26B-A4B mmproj-F16 |
Gemma 4 unified (gemma4uv) |
the gemma-4-unified-0.8B-tiny mmproj-f16 with its Q2_K text GGUF |
| Inkling 2 | the Inkling 2 mmproj-F16 |
The target is the whole Qwen family: qwen35, qwen35moe, qwen4exp, qwen3next, qwen3, qwen3moe.
# The first mmproj*.gguf next to the model is used
rustingstrata generate --model model.gguf --image photo.png --prompt "Describe this picture: <image>"
rustingstrata chat --model model.gguf --mmproj mmproj.gguf --image photo.png
rustingstrata serve --model model.gguf --mmproj mmproj.gguf --gpu| Flag | Default | Meaning |
|---|---|---|
--image SRC |
none | A file path, a data URL or an http(s) URL. Repeatable. |
--mmproj FILE |
the first mmproj*.gguf next to the model |
The projector file. none loads no projector. |
- In
generate, each image goes where the prompt has<image>. Without<image>, all images go before the prompt. generateis raw completion. A chat-tuned Gemma 4 needs its template in--prompt, or usechat.chatandserveuse the model'stokenizer.chat_template.--thinkturns Gemma 4 thinking on.- Image files are png, jpeg or webp.
serve reads OpenAI image_url parts and Anthropic image blocks (base64 or URL):
{"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}}
{"type": "image", "source": {"type": "base64", "media_type": "image/png", "data": "..."}}The chat page has an attach button, paste and previews. It sends image_url parts with the message.
An http(s) image is fetched only from a public address:
- Loopback, private, link-local, 100.64.0.0/10 and reserved addresses are refused. This also holds for IPv4-mapped, NAT64 and 6to4 IPv6 addresses, and for every redirect.
- With
HTTP(S)_PROXYorALL_PROXYset, the download goes through the proxy (NO_PROXYapplies). Redirects are not followed then. - The proxy resolves the host again. A DNS answer that changes after the check is not caught.
With --gpu the encoders (Qwen3-VL, Gemma 4, Inkling 2) run on the GPU, with CUDA or Vulkan.
- A 1024x768 image with the Qwen3.6-35B-A3B mmproj-BF16 on the RTX 3060 encodes in 4.1 to 4.5 s with CUDA and 3.8 to 4.7 s with Vulkan, against 24 s on the CPU (12 threads).
- An operation that fails on the GPU, for example for lack of VRAM, is reported once. It stays on the CPU for the rest of the run.
- The GPU encoder rounds differently, so its embeddings differ slightly from the CPU ones.
- Without a projector,
serveanswers an image request with a400that names--mmproj. - Gemma 4 in
chatandservedecodes greedily. Itsserverejects tools and answers on/v1/chat/completionsonly. - A Qwen3-VL image is resized with its aspect ratio kept, to a pixel count in
[8*32*32, 4096*32*32]. - A Gemma 4 image takes at least 40 tokens: a 64x64 image grows to 336x336.
- GLM-4V and DeepSeek-OCR projectors are rejected. RustingStrata has no matching text forward for them.
- DeepSeek V4.1-Flash and GLM-5.3 are text-only upstream, so they take no images.
- Audio projectors are out of scope.
| Variable | Meaning |
|---|---|
STRATA_VISION_CPU=1 |
Keep the whole image encoder on the CPU. |
STRATA_ALLOW_PRIVATE_IMAGE_URLS=1 |
Turn the address check off, for a trusted local setup. |