ComfyUI Node

Super Captioner

Local BLIP or cloud Gemini captions in a single node

By Gary-yeh·Created about a year ago·Updated about a year ago· 1
Super Captioner
  • image
  • caption
model_choice
google_api_key
prompt用繁體中文詳細描述這張圖片的內容。

The name overpromises, but the node is genuinely handy

SuperCaptioner is one of those "why didn't I just have this" nodes. You feed it an image, it hands you back a text caption, and a single dropdown decides who writes it: a local BLIP model that needs zero API keys and never leaves your machine, or Google's Gemini, which writes better and works in any language but bills you per request. No separate tagger pack, no second install, no swapping nodes when you change your mind.

Where does it slot into a workflow? The usual answer is dataset prep - you're building captions for LoRA training and you'd rather not round-trip through an external tool. But it's just as happy sitting in a live pipeline: caption an image and feed the text straight into a CLIPTextEncode for img2img, or stash it with a text-output node so you can reuse your best generations as prompt templates.

One honest caveat up front: the local half is BLIP, and BLIP is old. The community has been calling it formulaic for years - the KB's LoRA-training essay flat-out says it's "deprecated" and "widely considered unusable" for serious training captions, where the current favorites are JoyCaption and Florence 2 (or your own hand). BLIP-large here is fine for quick descriptions and pipelines; don't bet a high-stakes dataset on it. The Gemini half is where the quality actually is.

How it actually works

The node is a single class that branches on model_choice. Pick local: blip-large and it lazily loads Salesforce/blip-image-captioning-large from HuggingFace through transformers on first run - the download happens once, then it runs on your GPU in fp16 and caps output at 75 tokens. The nice touch: after generating it shoves the model back to CPU and empties the VRAM cache, so your subsequent Stable Diffusion pass doesn't fight a caption model for memory.

Pick anything starting google: and it hands the image to google.generativeai - the dropdown offers gemini-2.5-flash, gemini-2.0-flash, and gemini-2.0-flash-lite. Each image gets sent along with your prompt, and the API response becomes the caption. It needs an API key, which you can paste into the widget or set once as a GOOGLE_API_KEY environment variable.

Inputs and outputs that matter

You set exactly two things most of the time:

  • image - any IMAGE tensor; batches work (see below).
  • model_choice - the four-option dropdown: local: blip-large or one of the three Gemini flavors. This is the entire point of the node.

Then the optional pair: google_api_key (leave blank if you've exported GOOGLE_API_KEY), and prompt - whose default is 用繁體中文詳細描述這張圖片的內容。, i.e. "describe this image in detail in Traditional Chinese." Want English captions? Change it before you queue anything.

The single output is caption (STRING). Feed it a batch of images and it captions them all and joins the results with newlines, so if you're saving to a text file be ready for multiple captions in one string.

Installing it

Easiest route is ComfyUI Manager - search "SuperCaptioner" (or the pack title, "comfyui-super-captioner") and install. Otherwise:

cd ComfyUI/custom_nodes
git clone https://github.com/Gary-yeh/comfyui-super-captioner

Then restart ComfyUI. Dependencies are light - just transformers, google-generativeai, and Pillow - and Manager installs them automatically. The first BLIP run downloads the model from HuggingFace, so give it a minute and keep an internet connection handy. Small repo gotcha: the pack's own README still links a stale clone URL pointing at a different repo name (ARPlanet-Gary/SuperCaptioner); use the Gary-yeh/comfyui-super-captioner one above.

Troubleshooting

  • Gemini fails with "Google API Key is required" - the key's missing or blank. Set it in the widget or export GOOGLE_API_KEY before launching ComfyUI.
  • Check the output string, not just the console. The node catches exceptions and returns the error as the caption text. If your caption output suddenly reads like a Python traceback, that's the node telling you what went wrong.
  • Model-name churn. Google retires Gemini model names, and the README even references an older gemini-pro-vision that the shipped code replaced with the 2.x line. If a dropdown model gets deprecated, that option starts erroring - swap to whichever Gemini flavor is current.
  • First BLIP run feels frozen. It's downloading blip-image-captioning-large; it's not hung, it's fetching.

Bottom line: SuperCaptioner is a small, honest node. It won't produce training-grade captions like JoyCaption, and it skips Danbooru tags entirely - but as a "give me a usable description, privately or via Gemini, right here in the graph" tool it does exactly what it says on the box.

CategorySuperCaptioner

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
model_choiceCOMBO4 options: local: blip-large, google: gemini-2.5-flash, google: gemini-2.0-flash, google: gemini-2.0-flash-lite
google_api_keyoptSTRING
promptoptSTRING用繁體中文詳細描述這張圖片的內容。

Outputs (1)

NameTypeDescription
captionSTRING