Lance Text Image Prompt
The prompt node that hands Lance an image too
- data_config
- tokenizer
- new_token_ids
- image
- DATA_LOADER
Lance Text Image Prompt is the node you reach for when the job isn't "make something from nothing" - it's "change this image" or "animate this image." It pairs a text prompt with a reference image and packs both into the data loader that Lance Generation (or Lance Understanding) consumes.
This is one of three prompt nodes in the comfyui-lance-aio pack, the port of ByteDance's Lance-3B unified model. The plain Lance Text Prompt handles text-only tasks like text-to-image and text-to-video. This one adds an image input, which makes it the right node for image-to-video (i2v), image editing (image_edit), and image understanding (x2t_image). Pick the node that matches your task.
The inputs that matter
- prompt - your instruction, as a multiline string. For an edit task this is literally an instruction ("turn the sky to sunset"), for i2v it's a motion description, for understanding it's a question about the image.
- image - a standard ComfyUI
IMAGEtensor, so it plays nicely with Load Image and any upstream nodes. You're not stuck with a plain loader; pipe in anything that produces an image. - data_config, tokenizer, new_token_ids - relayed from Lance Args, the Tokenizer Loader, and Lance Configure respectively. Same three you'll see on every prompt node.
What comes out
A single DATA_LOADER output. That's the pack's custom type that carries your prompt, the image path, and the task's data config into the Lance Generation or Lance Understanding node. The output isn't an image or a tensor - it's a prepared batch. Don't look for a preview on this node; nothing renders here.
How it works
Under the hood the node does something that feels oddly old-school for a 2026 model: it writes your image to a temporary PNG file, then writes a JSONL record that says "here's a text element and here's an image element, in this order, and the text is the target" - or, for understanding tasks, the reverse with the image marked as the thing to look at. That record feeds the same validation-dataset pipeline the official ByteDance codebase uses, tokenized and batched into a DataLoader. It's a faithful port, which is why it goes through a temp file rather than passing tensors directly. The temp files are cleaned up by the OS; you don't need to manage them.
One thing worth knowing: the prompt node pays attention to what task says back in Lance Args. For understanding tasks it wraps your prompt in "Look at the image carefully and answer the question." For generation/edit tasks it leaves your text alone. So the same node behaves differently depending on the task - which is why the task/graph mismatch errors bite people who swap tasks without rewiring.
Installing the pack
It's part of comfyui-lance-aio, so install the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/SteveImmanuel/comfyui-lance-aio
cd comfyui-lance-aio
pip install -r requirements.txt
Or search comfyui-lance-aio in ComfyUI Manager. Requirements pin transformers>=4.50.3,<5 - the official Lance codebase breaks on transformers 5, so keep it pinned. You'll also need the checkpoints in ComfyUI/models/lance/ (Lance_3B/ or Lance_3B_Video/, plus the ViT and Wan 2.2 VAE files) and a restart.
Where people get burned
Using this node for a plain text-to-image task. If your task is t2i or t2v, you don't need an image and the node will carry an unused reference - reach for Lance Text Prompt instead. And mismatched task/node combos (understanding task + generation node) throw errors like "task is not a generation task" at the output stage, so keep task, prompt node, and output node consistent.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| data_config | DATA_CONFIG | — | |
| tokenizer | TOKENIZER | — | |
| new_token_ids | NEW_TOKEN_IDS | — | |
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DATA_LOADER | DATA_LOADER | — |