Nodes/ComfyUI-BAGEL/BAGEL Image Understanding
ComfyUI Node

BAGEL Image Understanding

The cheap node in the pack

By neverbiasu·Created about a year ago·Updated 18 days ago· 188
BAGEL Image Understanding
  • model
  • image
  • text
promptCan someone explain what's funny about this meme??
show_thinkingfalse
do_samplefalse
text_temperature0.30
max_new_tokens512

People forget that BAGEL isn't just a generator. The same 7B-active multimodal model that writes images also reads them - and this node is that half of the package. BAGEL Image Understanding takes an image and a question, and returns an answer as text. "Can someone explain what's funny about this meme?" is the built-in default prompt, and it's a fair summary of the vibe: this is a vision-language model that actually gets images, not a one-line classifier.

It's also the cheap node in the pack. Unlike generation and editing, understanding only uses the ViT (SigLIP/NaViT) path plus the language model - no VAE, no latent, no denoising. The README notes it needs less VRAM than the other two tasks, though you still need the BAGEL model loaded, so don't expect it to run on a 6 GB card. But relative to the 30 GB monster that is full-precision generation, it's positively light.

How it works

Feed it an IMAGE and it handles preprocessing itself - the node applies BAGEL's official 1024/512/16 resize internally, so you don't have to think about image sizing the way you do with BAGEL Image Edit. It then slots the image tokens in front of your prompt (matching the model's original inference ordering) and generates text. That's the whole pipeline. No VAE nodes are involved anywhere, which the source is careful to call out: the understanding workflow is ViT/text only.

The inputs

  • model - BAGEL_MODEL from the BAGEL Model Loader.
  • image - the image to analyze. Single image per run.
  • prompt - your question or instruction. BAGEL rewards asking like a person, not like a search query.
  • show_thinking - ask BAGEL to include its reasoning in the returned text.
  • do_sample - enable sampling for text generation (off by default; with it off you get greedy decoding).
  • text_temperature - 0 is deterministic, 1 is more creative; default 0.3 sits sensibly between.
  • max_new_tokens (default 512) - cap on the answer length, including any reasoning text.

Output: a single text (STRING). This node is marked as an output node, so it displays its result directly in the UI - no PreviewImage needed.

Reading the answer

The one friction point beginners hit: the text lands in the node's own UI, and depending on your ComfyUI version you may want it somewhere more visible. The pack's example workflow uses ShowText|pysssss from comfyui-custom-scripts to surface the answer, or the official Preview as Text node on newer ComfyUI builds. Either works; the node's own output widget is the fallback.

Installing

Identical to the rest of the pack: clone https://github.com/neverbiasu/ComfyUI-BAGEL into custom_nodes, pip install -r requirements.txt, drop a BAGEL .safetensors into models/bagel/, restart. Note that this is the one native node where you do not need the FLUX ae.safetensors - no VAE in this path. ComfyUI Manager users can search "ComfyUI-BAGEL" and skip the manual clone.

If you're using BAGEL mainly as an image editor and wondering whether to bother: the understanding node is a genuinely useful debug tool - feed it the image before and after an edit and ask it to describe the difference. Free, same model, no extra VRAM beyond what you're already using.

CategoryBAGEL/Understanding

Inputs (7)

NameTypeDefaultDescription
modelBAGEL_MODELNative BAGEL model from BAGEL Model Loader.
imageIMAGEImage to analyse. It is resized with BAGEL's official 1024/512/16 preprocessing.
promptSTRINGCan someone explain what's funny about this meme??Question or instruction about the image.
show_thinkingBOOLEANfalseAsk BAGEL to include its reasoning in the returned text.
do_sampleBOOLEANfalseEnable sampling for text generation.
text_temperatureFLOAT0.300–1Text-generation randomness; 0 is deterministic and 1 is more creative.
max_new_tokensINT51264–4096Maximum generated text length, including optional reasoning.

Outputs (1)

NameTypeDescription
textSTRING