Nodes/comfy-cliption/CLIPtion Generate
ComfyUI Node

CLIPtion Generate

Turn Any Image Into a Prompt Using the CLIP You Already Have Loaded

By pharmapsychotic·Created 2 years ago·Updated 2 years ago· 63
CLIPtion Generate
  • model
  • image
  • STRING
seed0
temperature0.70
best_of1
ramblefalse

The name is a lie. CLIPtion Generate doesn't call any API, needs no key, and doesn't load some big vision-language model on the side. It's a tiny captioning decoder that rides on the CLIP-L text encoder and CLIP-L vision encoder already sitting inside your checkpoint. If you're running SD, SDXL, SD3, or FLUX, you're already paying the VRAM cost of ViT-L/14 - CLIPtion just borrows it to write captions. That's the whole trick, and it's why this thing generates captions at roughly the speed of a blink.

You reach for it when you want a prompt in the workflow, not from a separate tool: auto-captioning a folder of images, feeding a generated image's description back into img2img or a text-to-image pass, or roughing out captions for a LoRA dataset before you clean them up by hand. The author is upfront about the trade-off - bigger dedicated captioners and VLMs will caption more accurately - and the community agrees. In the announcement thread people reported it faster than Florence and competitive with JoyCaption on simple concepts, but it clearly misses harder content and short-circuits on NSFW. Treat it as the fast convenience captioner, not the dataset gold standard.

Here's the mechanism. You feed a CLIPTION model from CLIPtionLoader plus an image. The image goes through the CLIP vision encoder, and then a small transformer decoder (six blocks, 768 hidden, 8 heads) generates tokens one at a time, up to CLIP's hard 77-token ceiling. Three knobs change how it writes. temperature (default 0.7) sets how random the sampling is - higher is more diverse, lower is more predictable. best_of (default 1, up to 64) samples that many candidate captions in parallel and picks the one whose text embedding has the highest CLIP similarity to the image, which is a neat self-correcting trick: you don't just hope the sampling was good, you grade the candidates. ramble forces the decoder to produce the full 77 tokens instead of stopping at its end-of-sentence token.

The inputs that matter, in order of how often you'll touch them:

  • image - any image or batch; the node captions each frame and returns one string per image.
  • seed - required, because this is sampling. Different seeds give different captions.
  • best_of - the one you'll actually turn up. Higher = better captions, more compute.

The output is a STRING list (one caption per input image). Wire it into a Show Text / Preview Text node to read it - the pack's example workflows use pythongosssss's ComfyUI-Custom-Scripts for that - or straight into a prompt encode node if you're chaining caption-to-generation.

Install is the usual: ComfyUI Manager, search "cliption", click install, restart. Manual route is cd ComfyUI/custom_nodes && git clone https://github.com/pharmapsychotic/comfy-cliption.git && pip install -r comfy-cliption/requirements.txt, then restart. Dependencies are refreshingly light - just huggingface-hub, safetensors, and transformers.

Where people get burned: the loader throws "Must use model which includes CLIP-L" if your checkpoint lacks the CLIP-L text encoder (any mainstream SD-family model has it, so this is usually a wrong-model pick, not a real problem). And you need a CLIP vision encoder wired in - install openai/clip-vit-large-patch14 via Manager > Model Manager > search "clip vision large". If captions feel short, that's the 77-token CLIP wall doing its job; flip ramble if you want the full-length ramble. If they feel wrong, that's not a bug - this is a 100MB captioner doing its best. For the money, it's remarkably good.

Categorypharmapsychotic

Inputs (6)

NameTypeDefaultDescription
modelCLIPTIONThe CLIPtion model.
imageIMAGE
seedINT00–18446744073709550000The random seed used for creating the caption.
temperatureoptFLOAT0.70Temperature for sampling.
best_ofoptINT11–64Number of options to evaluate.
rambleoptBOOLEANfalse

Outputs (1)

NameTypeDescription
STRINGSTRING