Signatures
Building an ImageInput
ImageInput.element is the browser-native path and the one you want. It is async, unlike
every other constructor.
From a file input
createImageBitmap decodes off the main thread, and closing it afterwards releases the
decoded pixels rather than waiting for GC.
From a camera
Streaming
Options
vlm takes the same LlmOptions as llm, so maxOutputTokens, temperature, and
systemPrompt all apply.
Models
VLM runs on the llama.cpp backend, so the model must be a GGUF vision model with its projector. Register@runanywhere/web-llamacpp and pick a VLM entry from the catalog. Vision
models are larger than text models, which matters more in a browser than anywhere else: check
the download size before offering one.