Nodes/orama/Vision Model Image Input
ComfyUI Node

Vision Model Image Input

The 5-second fix for feeding giant images to a vision model

By mamorett·Created 3 months ago·Updated 3 months ago· 0
Vision Model Image Input
  • image
  • image
max_side_px0

This node does one thing: it takes a ComfyUI image, optionally shrinks it, and hands it to a vision-language model. That's it. But it's the difference between a caption job that takes twenty seconds and one that thrashes your VRAM - or worse, makes the model miss the actual subject because the image is so big the vision encoder squashes the detail into nothing.

The pack is mamorett/orama, a set of nodes that runs three VLM families locally in-process - no API key, no Ollama server. Every inference node in it (LFM2.5-VL, Step3-VL, MiniCPM-V) expects a plain IMAGE, and Vision Model Image Input is the sanctioned way to prep it.

How it works

ComfyUI images are float32 tensors in (batch, height, width, channels) form, and they can be any size you generated. The node reads the longest side and, if max_side_px is set, scales the image down with a torchvision resize (antialiased, aspect ratio preserved). Set max_side_px to 0 - the default - and it just passes the tensor straight through, untouched.

The input that matters

Only two fields here, and really only one you'll touch:

  • image (required) - the IMAGE tensor, usually straight from Load Image or a VAE Decode.
  • max_side_px - resize the longest side to this value. Default 0 = no resize. Range 0–4096, snapped to steps of 64 so dimensions stay tidy.

The output is an IMAGE that plugs into the image socket of whichever inference node you're using.

When to actually use it

The classic beginner mistake is skipping this entirely and wiring a 2048px render straight into a VLM. The models resize internally anyway, but you pay for it twice: more pixels means more memory and slower preprocessing before the model even starts, and on the MiniCPM-V family it means more visual tokens. Dropping to ~1024–1536 on the longest side is the usual sweet spot - enough detail to caption, small enough to be quick.

One honest limitation: the inference nodes convert to PIL and describe only the first frame of whatever you feed them. So this node won't magically make the pack caption video - keep it to single images.

Installing it

It ships with the rest of the pack, so:

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

Restart ComfyUI, or grab it via ComfyUI Manager by searching orama. Models download themselves to ComfyUI/models/vision_models/ on first use. Full install details live in the pack README - this node specifically has zero extra dependencies beyond what ComfyUI already ships.

Categoryorama

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
max_side_pxoptINT00–4096Resize longest side to this value (0 = no resize)

Outputs (1)

NameTypeDescription
imageIMAGE