Nodes/comfy-cliption/CLIPtion Loader
ComfyUI Node

CLIPtion Loader

The 100MB Adapter That Gives Your Loaded CLIP a Second Job

By pharmapsychotic·Created 2 years ago·Updated 2 years ago· 63
CLIPtion Loader
  • clip
  • clip_vision
  • CLIPTION

CLIPtion Loader is the boring node that makes the other two in this pack work, and it's also the one that trips people up first. It's not a captioning node itself - it's the adapter. It takes the CLIP text encoder you've already loaded for diffusion, combines it with a CLIP vision encoder from a Load CLIP Vision node, and hands you a CLIPTION object that CLIPtion Generate and CLIPtion Beam Search actually run on. No CLIPTION out, no captions, and the error messages don't always make that obvious.

The mechanism is where the "small and fast" claim comes from. The pack ships a tiny safetensors file, CLIPtion_20241219_fp16.safetensors, that contains only what's missing: a small caption decoder (six transformer blocks, 768 hidden, 8 heads, capped at the 77 tokens CLIP understands) plus a copy of the text projection weights, because the stock SD CLIP loader leaves that projection empty. The loader grabs the tokenizer, token embeddings, and vision backbone from the models you already have in memory, then bolts this little decoder on top. That's why the whole thing costs roughly an extra 100MB instead of several gigabytes.

Two required inputs, no optional ones:

  • clip - any CLIP model from your checkpoint (SD, SDXL, SD3, FLUX all qualify).
  • clip_vision - a CLIP_VISION from the core Load CLIP Vision node.

Output is a single CLIPTION model wire, which feeds directly into the model input of the two caption nodes.

Where people get stuck, in order of likelihood. First, the loader throws Must use model which includes CLIP-L if your checkpoint doesn't contain the CLIP-L text encoder - every mainstream SD-family checkpoint does, so this usually means you've wired in something unexpected, or picked a model without the text encoder in the current workflow. Second, you need the vision model. If you've never loaded one, grab openai/clip-vit-large-patch14 through ComfyUI Manager > Model Manager > search "clip vision large" - the README's exact recommendation. Third, the model file itself. The loader looks for CLIPtion_20241219_fp16.safetensors in the ComfyUI/custom_nodes/comfy-cliption folder; if it's not there, it auto-downloads it from HuggingFace into your HF cache (controlled by HF_HOME) the first time you run. If you're offline or want it local, drop the file into that folder yourself and it'll use it silently.

Install is the shared pack story: ComfyUI Manager, search "cliption", install, restart - or cd ComfyUI/custom_nodes && git clone https://github.com/pharmapsychotic/comfy-cliption.git && pip install -r comfy-cliption/requirements.txt. Dependencies are light (huggingface-hub, safetensors, transformers), so the usual dependency hell of ComfyUI custom nodes doesn't apply here. This is one of those quiet nodes you set up once and never think about again - which is exactly what a loader should be.

Categorypharmapsychotic

Inputs (2)

NameTypeDefaultDescription
clipCLIPThe CLIP model used for encoding the text.
clip_visionCLIP_VISION

Outputs (1)

NameTypeDescription
CLIPTIONCLIPTION