VLM Online Node
Overview
The VLM Online node (vlm-online-inferencer, VLM online in the palette) finds objects in an image with a vision-language model: you describe what to look for in words, instead of training a model for it. It returns a box and a confidence for each object found.
The model runs in the cloud, through the Rosepetal orchestrator of the project: there is no GPU and no container on the device. The node sends the image to the platform, which calls the model provider and charges the call to the project's token allowance. The environment is chosen from the project of the firebase-config node, so there is no address to configure.
A call takes seconds and costs tokens, so the node is meant for inspecting a frame when something happens, not for every frame of a fast line.
Key Features
- Open vocabulary: a prompt such as "every screw head", or a closed list of tags with a description each
- Same detections as the other inference nodes: relative coordinates (0 to 1) in every box format, so
rp-add-bbsorrp-cropBBcan take them unchanged - No local resources: no GPU, no Docker image, nothing kept open between messages
- Model catalog of the platform in the editor
- Debug image with the boxes drawn on the frame that was sent
Configuration
| Property | Default | Meaning |
|---|---|---|
| Name | empty | Label of the node; VLM online when empty. Also the key of its timings |
| Credentials | none (required) | The firebase-config node of the project. Its session authenticates every call, and its project decides the environment. Without it the node shows no credentials |
| Model | none (required) | The provider model that answers, from the platform's catalog for the project. The list needs a deployed, signed-in Credentials node. A model marked (deprecated) keeps working on a node that uses it, but is not offered to new ones |
| Image | msg.payload | Where the image is: a msg, flow or global property |
| Find by | Prompt | Prompt — the model names what it finds or Tags — a fixed list of labels. Only the chosen field is sent |
| Prompt | empty | A sentence describing what to find. A string, or a msg, flow or global property |
| Tags | empty | The labels the model must choose from (see Tags). Edited as rows (list), as JSON, or read from a msg, flow or global property |
| Output | inference | msg property that receives the detections |
| Parameters | {} | Optional sampling overrides for the provider call, as a JSON object or from a msg, flow or global property. An empty object is not sent |
| Timeout | 30000 | Milliseconds to wait for the platform |
Under Debug Image: Show debug image (off), Debug interval (1), Debug image width (160), Box thickness (2, 1 to 10) and Font size (0.5, 0.3 to 2), with the same meaning as in the inferencer. The boxes are drawn on the JPEG that was sent.
Tags
Each tag has a name and an optional description, which becomes that tag's own line in the prompt: the place to say "the capsule on the neck, not the neck" next to the label it applies to.
[
{ "name": "cap", "description": "the aluminium capsule on the neck, not the neck" },
{ "name": "front label", "description": "the large label facing the camera" },
{ "name": "barcode" }
]The name is also the tag of each detection. A tag with an explicit id keeps it, for flows that map the answer to a dataset's own tag ids. Read from a message, the value can also be an array of strings, or a comma-separated string of names.
Prompt or tags
A prompt opens the vocabulary: the model names what it finds, and those names come back in tag. Tags close it to your list. The two are alternatives: Find by selects one and the node sends only that one, whatever the other field holds. A flow saved before Find by existed uses the prompt when it has one, and the tags otherwise.
Parameters
Sampling overrides that the node passes to the platform as they are, for example:
{ "max_tokens": 16384, "reasoning": { "effort": "low" } }The platform decides which keys it accepts and answers 400 to the others; the node's help in the editor lists them.
Input
msg.payload = imageBuffer; // a JPEG, PNG, WebP or GIF Buffer, or a raw bitmap
return msg;- An encoded image is sent as JPEG: a JPEG as it is, the other formats converted on the device (quality 85).
- A raw bitmap
{ data, width, height, channels, colorSpace }is converted to JPEG.channels(1, 3 or 4) is computed from the length ofdatawhen missing;BGRandBGRAare swapped to RGB first. - A
Bufferthat is not an encoded image fails withBuffer input is not a recognized encoded image (JPEG/PNG/WebP/BMP/GIF). A raw pixel buffer must be wrapped as {data, width, height, channels}. - A raw bitmap whose
datadoes not matchwidth × height × channels, or with a channel count other than 1, 3 or 4, fails with an error that says which; any other value fails withUnsupported image input. Expected an encoded image Buffer or a rosepetal raw bitmap {data, width, height, channels, colorSpace}.
Output
The Output property receives an array, one entry per object found:
msg.inference = [
{
tag: "cap",
confidence: 0.91,
raw_boxes: [[0.41, 0.08], [0.58, 0.08], [0.58, 0.19], [0.41, 0.19]],
"2points": { xmin: 0.41, ymin: 0.08, xmax: 0.58, ymax: 0.19 }
// ...plus 4points, xywhr and cwh
}
]The box formats are those of the inferencer, computed by the same code. There is no classId or color: a prompted model answers with label names, not indices into a class list.
Timings go to msg.performance.<Name> (msg.performance.VLMOnline when the node has no name):
| Property | Meaning |
|---|---|
startTime, endTime | When the node started and finished, in milliseconds since 1970 |
encodeMs | JPEG encoding on the device |
requestMs | The round trip to the platform |
inferenceMs | The provider's share of it, as the platform measured it; null when it reports none |
totalMs | The whole message |
Status and Errors
| Status | Meaning |
|---|---|
grey ring idle | Ready |
red ring no credentials | No Credentials node selected |
yellow encoding, inferring | Converting the image, waiting for the platform |
green Total: Xms | Node: Yms | Server: Zms | Comm: Wms | Last call: total, encoding, provider time, and the rest of the round trip. Server and Comm show ? when the platform reports no provider time |
| red, a short label | The last message failed; back to idle after 8 seconds. The label is the one in the table below, or the first 40 characters of the error when it has none |
A message that fails is not sent on: the error reaches the debug sidebar and any catch node. The errors are:
| Error | Status label | Cause |
|---|---|---|
No model selected. | Model is empty | |
No image on the configured input property. | Nothing at Image | |
Task 'vlm:detect' needs a prompt. / Task 'vlm:detect' needs at least one tag. | The field chosen by Find by is empty | |
No credentials: select a firebase-config node. ... | no credentials | No Credentials node |
The firebase-config node is not signed in. Check its status in the editor. | not signed in | The Credentials node has no session yet |
Token allowance exhausted for this project. Usage is shared across the whole project, not per device. | no tokens left | The platform answered 402 |
Usage metering is unavailable, so the request was refused rather than run unmetered. Retry shortly. | metering unavailable | 503 |
Credentials rejected: <detail> | credentials rejected | 401 |
A message about inline images or about vlm:detect not being served | orchestrator too old | The project's orchestrator predates this node |
Request rejected: <detail> | rejected | Another 400, for example an unknown parameter |
HTTP <status>: <detail> | HTTP <status> | Any other error status from the platform |
| A message that the request timed out after N ms, or that it failed | No answer within Timeout, or the platform could not be reached |
A call the node gives up on is not cancelled on the platform: it can still finish there and be charged, and its answer is discarded. If a model is slow, raise Timeout rather than retrying.
Example
Check the closure of a bottle when a sensor fires, with a closed vocabulary:
[sensor trigger] → [camera] → [VLM online: Find by Tags] → [function] → [reject output]Tags: [{"name": "cap", "description": "the aluminium capsule on the neck"}, {"name": "missing cap", "description": "an open neck with no capsule"}]
// function: reject when no cap is seen with enough confidence
const caps = msg.inference.filter(d => d.tag === "cap" && d.confidence >= 0.6);
msg.payload = caps.length === 0; // true = reject
return msg;Related Nodes
- Inferencer Node - Trained models on the device, same detection shape
- Firebase Config Node - The credentials this node uses