Nodes/ComfyUI_AceNodes/πŸ… Image Question Answering
ComfyUI Node

πŸ… Image Question Answering

Ask a generated image what's in it β€” local vision QA with moondream2 or MiniCPM-V

By hay86Β·Created 2 years agoΒ·Updated about a year agoΒ· 96
πŸ… Image Question Answering
  • image
  • STRING
β—„textβ–Ί
β—„modelβ–Ύβ–Ί

"Describe what's in this image," asked of a model that runs on your machine, with no API key. That's ACE_ImageQA - a vision-language QA node that takes an image, a question, and a model choice, and returns a text answer. It's the "auto-caption my generations" node, or the "is there a hat in this?" checker, or the first half of an automated feedback loop that re-prompts based on what the model saw.

It's part of πŸ… Ace Nodes (hay86/ComfyUI_AceNodes), the usual one-author grab-bag - and it's one of the heavier nodes in it, because it runs real multimodal models locally.

How it works

You pick a model, both real open-weight vision-language models loaded through transformers:

  • moondream2 (default) - a ~1.8B lightweight VLM from vikhyatk/moondream2. Small, fast, runs on modest hardware, good enough for general captioning and simple questions. This is the one to start with.
  • MiniCPM-V-2 - OpenBMB's older 8B vision-language model. Notice the name: this is MiniCPM-V 2, not the newer 2.6. It's a substantially bigger download and heavier at inference, with better answers - the kind of jump you make when moondream2's summary is too shallow.

The first use of either model downloads it into ComfyUI/models/prompt_generator/. moondream2 is a few hundred MB; MiniCPM-V-2 is multiple GB and will look frozen while it pulls. Both are cached after that.

Inputs: image (a single IMAGE), text (your question, multiline), and model. Output is STRING - the answer. One image at a time; don't feed it a big batch and expect per-frame answers.

What people actually hit

  • First-run downloads are the whole setup cost. Budget for it, especially if you pick MiniCPM-V-2 sight unseen on a small drive.
  • It's a QA node, not a captioner-in-a-box. You still have to ask a good question. "Describe this image" works; "count the people" is where small VLMs start hallucinating - verify answers before you build automation on them.
  • Device handling is automatic (CUDA β†’ MPS β†’ CPU), with bf16 on capable cards, but an 8B model on CPU will be painfully slow. moondream2 is the realistic choice on anything without a GPU.

Installing

ComfyUI Manager β†’ search ComfyUI_AceNodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/hay86/ComfyUI_AceNodes

Then restart. This node needs transformers and huggingface_hub from the pack's requirements.txt - which also pulls the usual heavy tail (rembg, insightface, soundfile, openai, …). The model downloads are separate from the pack install and land in models/prompt_generator.

The honest comparison: there are dedicated captioning/QA packs with more models and fancier pipelines. What this one gets you is a competent, local, single-node "ask the image a question" with zero setup beyond the download. If your use is occasional auto-captioning, that's plenty. If you're building a serious eval or captioning pipeline, you'll outgrow it - but it's a genuinely decent place to start.

CategoryAce Nodes

Inputs (3)

NameTypeDefaultDescription
imageIMAGEβ€”
textSTRINGβ€”
modelCOMBO2 options: moondream2, MiniCPM-V-2

Outputs (1)

NameTypeDescription
STRINGSTRINGβ€”