Lance Image Understanding
Ask a loaded model questions about a picture
- model
- image
- text
Lance isn't just a generator - it's a vision-language model too, and Lance Image Understanding is the question-answering half. Same loaded pipeline, no diffusion involved: you hand it an image and a question, it decodes a text answer. "What color is the car?" "Describe this image in detail." It's the sort of node that sounds trivial until you realize you can now caption, interrogate, and filter your own generations in the same graph that made them, without a separate VLM download.
The "understanding" half is the reason this pack's loader gives you a choice of model variants for the same task. The node works with either lance_3b or lance_3b_video - the vision encoder and LLM are shared, so you can run it off whatever variant you already have loaded. Mechanically it writes your image to a temp PNG, builds the official x2t_image interleave format (image, then the instruction + question text, then an empty answer slot), and runs the same validate_on_fixed_batch path the generation nodes use - just with understanding_* inference flags instead of denoising. You get one output: text, a plain string.
The inputs that matter
- image - any IMAGE, from Load Image or from one of this pack's own generators. Run an edit, then interrogate the result in the same workflow.
- question - defaults to "Describe this image in detail." Ask anything.
- system_instruction - the official Lance instruction prefix, "Look at the image carefully and answer the question." It's editable, which is the author's way of exposing the first line of the text template; leave it unless you're experimenting with prompt behavior.
- max_tokens - 512 default, 64–1024. Crank it for long captions, trim it for yes/no answers.
- temperature (1.0) and do_sample - here's the one bit of real advice: do_sample is off by default and that's the recommended setting. Greedy decode gives consistent, deterministic answers; sampling makes them more varied (and more hallucination-prone). Enable it only when you want creative interpretations, not facts.
- model - the LANCE_MODEL from the loader.
Wiring it up
[Lance Model Loader] → [Load Image] → [Lance Image Understanding] → [Show Text]
It's marked as an output node, so the answer shows up in the queue automatically; a Show Text node just makes it readable. And because the output is a STRING, you can feed it into prompt builders, conditioners, or any text-based logic downstream - captioning a batch to build a dataset is the obvious killer use.
Gotchas
This is the lightest node in the pack, but it still needs the whole model loaded, so the 40GB VRAM floor applies to it too - no "understanding-only" lighter mode exists. Inputs are padded to the VAE stride even though no VAE decode happens on the understanding path, and very large images cost extra ViT tokens, so downscale before asking if you're sending a 4K render. And remember it's greedy by default: if an answer looks confidently wrong, that's the model, not a settings bug - but sampling may not help much either.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | LANCE_MODEL | — | |
| image | IMAGE | — | |
| question | STRING | Describe this image in detail. | — |
| system_instruction | STRING | Look at the image carefully and answer the question. | Official Lance x2t_image instruction prefix (first line of the text template). |
| max_tokens | INT | 51264–1024 | Maximum tokens to generate for the answer. |
| temperature | FLOAT | 1.00.1–2 | Sampling temperature when do_sample is enabled. |
| do_sample | BOOLEAN | false | Greedy decode when off (recommended). Enable for more varied answers. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |