Divooka Reference

Vision Language Models

7 nodes

On this page 7

Ask About Image

Function

Asks a question about a picture.

Signature
AskAboutImage -> Text
    model: Vision Language Model
    image: Pixel Image
    question: Text
    system: Text
    settings: Generation Settings
string AskAboutImage(
    VisionLanguageModel model,
    PixelImage image,
    string question,
    string system,
    GenerationSettings settings)

Parameters

nametypedefaultdescription
modelVision Language Model—A vision language model.
imagePixel Image—The picture.
questionText—What to ask.
systemText—What the model is told about its part first; empty for none.
settingsGeneration Settings—How it chooses its words; empty for the model's own defaults.

Returns

ReplyText
Ships with
Divooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Vision Language Models
Package
Machine Learning

Ask About Images

Function

Asks a question about several pictures at once, shown in order before the question.

Signature
AskAboutImages -> Text
    model: Vision Language Model
    images: Pixel Image Array
    question: Text
    system: Text
    settings: Generation Settings
string AskAboutImages(
    VisionLanguageModel model,
    PixelImage[] images,
    string question,
    string system,
    GenerationSettings settings)

Parameters

nametypedefaultdescription
modelVision Language Model—A vision language model.
imagesPixel Image Array—The pictures, such as Make Image Array gives.
questionText—What to ask, such as "How do these pictures differ?".
systemText—What the model is told about its part first; empty for none.
settingsGeneration Settings—How it chooses its words; empty for the model's own defaults.

Returns

ReplyText
Ships with
Divooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Vision Language Models
Package
Machine Learning

Chat About Image

Function

Says a message in a conversation, showing a picture with it, and answers with the model's reply and the conversation with both added, to continue from.

Signature
ChatAboutImage -> (Reply: Text, continued: Conversation)
    model: Vision Language Model
    message: Text
    image: Pixel Image
    conversation: Conversation
    settings: Generation Settings
string ChatAboutImage(
    VisionLanguageModel model,
    string message,
    PixelImage image,
    Conversation conversation,
    GenerationSettings settings,
    out Conversation continued)

Parameters

nametypedefaultdescription
modelVision Language Model—A vision language model.
messageText—What the user says.
imagePixel Image—The picture the message shows; empty for one that talks about pictures shown earlier.
conversationConversation—The conversation so far, from Start Conversation or an earlier Chat About Image; empty to start one.
settingsGeneration Settings—How it chooses its words; empty for the model's own defaults.

Returns

ReplyText
continuedConversation
Ships with
Divooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Vision Language Models
Package
Machine Learning

Describe Image

Function

Asks the model to describe a picture: "Describe this image."

Signature
DescribeImage -> Text
    model: Vision Language Model
    image: Pixel Image
    settings: Generation Settings
string DescribeImage(
    VisionLanguageModel model,
    PixelImage image,
    GenerationSettings settings)

Parameters

nametypedefaultdescription
modelVision Language Model—A vision language model.
imagePixel Image—The picture.
settingsGeneration Settings—How it chooses its words; empty for the model's own defaults.

Returns

DescriptionText
Ships with
Divooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Vision Language Models
Package
Machine Learning

Load Vision Language Model

Function

Loads a vision language model and its processor from a Hugging Face Hub repository or a folder, downloading what is missing.

Signature
LoadVisionLanguageModel -> Vision Language Model
    model: Text
    device: Compute Device
    precision: Precision
VisionLanguageModel LoadVisionLanguageModel(
    string model,
    ComputeDevice device = ComputeDevice.Auto,
    Precision precision = Precision.Auto)

Parameters

nametypedefaultdescription
modelText—A repository id such as HuggingFaceTB/SmolVLM-256M-Instruct, Qwen/Qwen2-VL-2B-Instruct or Qwen/Qwen3-VL-2B-Instruct, or a folder.
deviceCompute DeviceAutoWhere it runs.
precisionPrecisionAutoThe number format of its weights; Auto is Float32 on the CPU and the model's own on the GPU.

Returns

ModelVision Language Model
Ships with
Divooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Vision Language Models
Package
Machine Learning

Make Image Array

Function

Up to eight pictures as one array, for Ask About Images; unconnected inputs are left out.

Signature
MakeImageArray -> Pixel Image Array
    first: Pixel Image
    second: Pixel Image
    third: Pixel Image
    fourth: Pixel Image
    fifth: Pixel Image
    sixth: Pixel Image
    seventh: Pixel Image
    eighth: Pixel Image
PixelImage[] MakeImageArray(
    PixelImage first,
    PixelImage second,
    PixelImage third,
    PixelImage fourth,
    PixelImage fifth,
    PixelImage sixth,
    PixelImage seventh,
    PixelImage eighth)

Parameters

nametypedefaultdescription
firstPixel Image—The first picture, shown first.
secondPixel Image—The second picture.
thirdPixel Image—The third picture.
fourthPixel Image—The fourth picture.
fifthPixel Image—The fifth picture.
sixthPixel Image—The sixth picture.
seventhPixel Image—The seventh picture.
eighthPixel Image—The eighth picture.

Returns

ImagesPixel Image Array
Ships with
Divooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Vision Language Models
Package
Machine Learning

Stream Chat About Image

Function

Chat About Image, with the reply handed to a function piece by piece as it is written, so it can be shown before it is finished.

Signature
StreamChatAboutImage -> (Reply: Text, continued: Conversation)
    model: Vision Language Model
    message: Text
    image: Pixel Image
    conversation: Conversation
    settings: Generation Settings
    onText: Action<Text>
string StreamChatAboutImage(
    VisionLanguageModel model,
    string message,
    PixelImage image,
    Conversation conversation,
    GenerationSettings settings,
    Action<string> onText,
    out Conversation continued)

Parameters

nametypedefaultdescription
modelVision Language Model—A vision language model.
messageText—What the user says.
imagePixel Image—The picture the message shows; empty for one that talks about pictures shown earlier.
conversationConversation—The conversation so far; empty to start one.
settingsGeneration Settings—How it chooses its words; empty for the model's own defaults.
onTextAction<Text>—Called with each new piece of the reply, in order.

Returns

ReplyText
continuedConversation
Ships with
Divooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Vision Language Models
Package
Machine Learning