Nodes/VLM_nodes/MC-LLaVA
ComfyUI Node Runs on cloud

MC-LLaVA

The 3B VLM that sees the whole image, crops and all

By gokayfem·Created 3 years ago·Updated 18 days ago· 587
MC-LLaVA
  • image
  • STRING
promptDescribe the image.
temperature0.10
top_p0.90
max_crops100
num_tokens728
max_new_tokens200
unload_afterfalse

Most small VLMs look at a downscaled thumbnail of your image, which is exactly why they miss fine details. MCLLaVAModel (displayed as MC-LLaVA) takes the opposite approach: instead of shrinking the picture, it crops it into many overlapping pieces and lets the model look at them all. It's a compact 3B model, but it's built for whole-image understanding - the "MC" is the whole trick.

What it's for

A middle-weight captioner. If Qwen2-VL is overkill for your hardware and Moondream is too dumb for the detail you need, MC-LLaVA sits between them: bigger than the edge models, smaller than the 7B+ class, and with a mechanism that punches above its weight on detail-heavy images because it doesn't throw away resolution.

How it works

On first run it downloads visheratin/MC-LLaVA-3b from Hugging Face into models/LLavacheckpoints/files_for_mcllava (or its subfolder) and runs through Transformers with trust_remote_code - the model's processor is custom. When you execute, the processor slices your image into a grid of crops (max_crops, default 100) and encodes each one into a number of visual tokens (num_tokens, default 728). The model then reasons over the whole patchwork, which is why it can describe what's happening in the background and the foreground.

The inputs that matter

  • image and prompt - the obvious two; the prompt is multiline so you can be specific.
  • max_crops - how many crops the processor may take. More crops = more coverage, slower. Leave at 100 unless you're on huge images.
  • num_tokens - visual tokens per crop. This is the real quality/VRAM dial: more tokens per crop captures more detail but eats memory.
  • temperature / top_p - sampling; the 0.1 default keeps it deterministic.

Output is a single STRING - the description. View it with ViewText or pass it down the prompt-generation chain.

Install

Standard for this pack:

cd ComfyUI/custom_nodes
git clone https://github.com/gokayfem/ComfyUI_VLM_nodes
python -m pip install -r ComfyUI/custom_nodes/ComfyUI_VLM_nodes/requirements.txt

Honest notes

The current README files this under the legacy model loaders and points new graphs at the pack's newer Modern VLM interface, which covers the same architectures through one node. The good news for people with old workflows: it's kept working, so those saved graphs still run. Practical warning: max_crops and num_tokens both scale cost, and the default 728 tokens per crop adds up - if generation feels slow, drop num_tokens before you drop max_crops, since more crops is what gets you the whole-image understanding.

CategoryVLM Nodes/Legacy/Model Loaders

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
promptSTRINGDescribe the image.
temperatureFLOAT0.100–2
top_pFLOAT0.900–1
max_cropsINT1001–300
num_tokensINT7281–4096
max_new_tokensoptINT2001–4096
unload_afteroptBOOLEANfalse

Outputs (1)

NameTypeDescription
STRINGSTRING