Nodes/orama/LFM2.5-VL (Liquid AI)
ComfyUI Node

LFM2.5-VL (Liquid AI)

Liquid AI's 1.6B VLM as a ComfyUI node

By mamorett·Created 3 months ago·Updated 3 months ago· 0
LFM2.5-VL (Liquid AI)
  • model
  • image
  • settings
  • text
promptDescribe this image in detail.
max_new_tokens512
temperature0.70
top_k50
top_p0.90
repetition_penalty1.00
do_sampletrue
system_prompt

LFM2.5-VL (Liquid AI) is the inference half of the pack's budget option: take the model loaded by Load LFM2.5-VL Model, point it at an image, and get back a text description. This is the node you wire when you want a fast, local captioner that doesn't demand 20 GB of VRAM - think quick image analysis, captioning a LoRA training set, or seeding an img2img prompt from an existing render.

It's from mamorett/orama, which runs three VLM families in-process. LFM2.5-VL is Liquid AI's 1.6B extraction-focused model - it's the least powerful of the pack's three, and it knows it. Don't ask it for deep scene analysis; ask it for a clean structural description and it'll do the job in seconds on modest hardware.

How it works

The node converts the incoming ComfyUI image tensor to a PIL image, builds a chat message (system_prompt optional, then the image plus your prompt), runs it through the processor's apply_chat_template, and calls model.generate() under torch.no_grad(). The prompt tokens are stripped from the output and the generated portion is decoded and returned as plain text. Nothing exotic - this is the standard modern-transformers VLM pattern.

The inputs that matter

Most of these are the same generation dials across the whole pack, so learn them once:

  • model - the LFM2_VL_MODEL output from the loader.
  • image - the IMAGE tensor. Run it through Vision Model Image Input first if it's huge.
  • prompt - multiline text, default "Describe this image in detail." This is where you actually direct the model.
  • max_new_tokens - default 512, up to 8192.
  • temperature / top_k / top_p - sampling controls, defaults 0.7 / 50 / 0.9.
  • repetition_penalty - 1.0 = off.
  • do_sample - True by default. Flip it to False for greedy decoding; that gives you deterministic output, which is genuinely useful when you're captioning a dataset and want the same image to caption the same way every run.

Two optional inputs matter more than they look: system_prompt (leave blank to omit, and blank is a fine choice - it keeps the answer short) and settings, which is where the pack's Vision Model Settings node plugs in. If settings is connected, it overrides the inline widgets.

Output

A single text (STRING) socket. That's it. Wire it into a Show Text node to read it, a text file saver, or - the classic move from this pack's corner of the ecosystem - feed it forward into an LLM node to reshape the description into a prompt.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/mamorett/orama

Restart ComfyUI, or find orama in ComfyUI Manager. Requirements: transformers>=5.7.0 - update it before installing the pack or the import will choke. The weights auto-download to ComfyUI/models/vision_models/ on first run, and if a model ever needs a HuggingFace token, set HF_TOKEN in the environment before launching ComfyUI.

One caveat worth knowing: the node describes only the first frame of whatever image it's given, so a batched set of images gets one caption, not one per image.

Categoryorama/LFM2.5-VL

Inputs (11)

NameTypeDefaultDescription
modelLFM2_VL_MODEL
imageIMAGE
promptSTRINGDescribe this image in detail.
max_new_tokensINT5121–8192
temperatureFLOAT0.700–2
top_kINT500–1000
top_pFLOAT0.900–1
repetition_penaltyFLOAT1.001–2
do_sampleBOOLEANtrue
system_promptoptSTRINGOptional system prompt. Leave blank to omit.
settingsoptVISION_SETTINGS

Outputs (1)

NameTypeDescription
textSTRING