ComfyUI Node Runs on cloud

BLIP Caption

BLIPCaption — turn an image into a plain-English caption for img2img and prompting

By sipherxyz·Created 3 years ago·Updated 4 months ago· 352
BLIP Caption
  • image
  • blip_model
  • caption
min_length24
max_length48
device_mode
prefix
suffix
enabledtrue

Feed it an image, get back a sentence describing what's in it. BLIP is an image-captioning model, and this node runs it: "a woman sitting on a bench in front of a brick wall," that kind of thing. The caption comes out as a STRING, which means you can wire it straight into a prompt, a text-concatenation node, or a save-to-file for building a training dataset. It's the "describe this for me" node.

The everyday use is img2img and style transfer: you have a reference image but no prompt for it, so you caption it, tweak the words, and generate variations. The other big one is dataset captioning for LoRA training - run a folder of images through BLIP to get a starting caption for each, then clean them up. BLIP writes natural language, so it's a good fit for models that want sentences (SD 1.5, and the natural-language half of modern prompts) and a poor fit for tag-based anime models, where you'd want a Danbooru tagger instead.

How it works

BLIP (Bootstrapping Language-Image Pre-training) is a vision-language model trained to look at an image and generate a description of it. This node passes your image through the model's captioning head and returns the generated text. It needs the BLIP weights loaded - either it grabs a default, or you feed it a model from DownloadAndLoadBlip through the blip_model input, which is the cleaner setup because you control which checkpoint gets used and it isn't reloaded every run.

The inputs and outputs that matter

  • image - the picture to describe.
  • min_length / max_length - caption length in tokens, defaults 24 and 48. Raise max_length for wordier, more detailed captions; keep it tight if you want a short tag-like phrase. BLIP tops out fairly terse regardless - it's a describer, not an essayist.
  • blip_model (optional) - a BLIP_MODEL from the loader node. Wire this if you want explicit control; leave it and the node handles the model itself.
  • device_mode (optional) - AUTO, Prefer GPU, or CPU. AUTO is fine. Force CPU only if you're tight on VRAM and don't mind it being slower.
  • prefix / suffix (optional) - text glued to the front/back of every caption. Handy for pinning a trigger word or a fixed style tag onto a whole dataset.

Output is caption (a STRING, delivered as a list so it handles batches). Wire it into your prompt path or a text-save node.

How to install it

Part of the Art Venture pack. ComfyUI Manager → search comfyui-art-venture → Install → restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/sipherxyz/comfyui-art-venture

then pip install -r comfyui-art-venture/requirements.txt and restart. You'll also need the BLIP weights - see troubleshooting.

Common issues & troubleshooting

"BLIP model not found" / no captions. The weights aren't where BLIP expects them. The reliable fix that people land on: put the .pth file in ComfyUI/models/BLIP. The cleaner path is to add a DownloadAndLoadBlip node, let it fetch the model, and wire its BLIP_MODEL output into this node's blip_model input - then you're not guessing at folders.

The caption is generic or slightly wrong. That's BLIP being BLIP - it's an older, small captioner and it describes the obvious. Treat its output as a draft prompt, not gospel. Raising max_length gives more words but not necessarily more accuracy.

Wrong tool for anime. BLIP writes prose. If you're captioning anime/illustration for a booru-style model, its sentences won't match how that model was trained on tags - reach for a Danbooru tagger (Art Venture's DeepDanbooruCaption, or the more modern WD14 taggers) instead.

CategoryArtVenture/Captioning

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
min_lengthINT240–200
max_lengthINT480–200
device_modeoptCOMBO3 options: AUTO, Prefer GPU, CPU
prefixoptSTRING
suffixoptSTRING
enabledoptBOOLEANtrue
blip_modeloptBLIP_MODEL

Outputs (1)

NameTypeDescription
captionSTRING