Nodes/civitai-comfy-nodes/Civitai Media Captioning
ComfyUI Node

Civitai Media Captioning

Auto-captions without installing a VLM — Civitai's captioner node

By civitai·Created 2 months ago·Updated about a month ago· 42
Civitai Media Captioning
  • media_url
  • api_config
  • caption
  • workflow_id
  • raw_json
temperature0.50
max_new_tokens300
custom_instructions

Captioning is the job everyone hates and nobody can skip: you need a good text description of an image for LoRA training data, or you want a prompt seeded from an existing picture. The local answer is JoyCaption or Florence-2, which are genuinely good but need a model install and VRAM headroom. This node is the other answer: Civitai's own captioning model, running on their servers, wired into your graph. Drop an image in, get a caption string out. No VLM download, no VRAM budget.

How it works

Like every node in the civitai-comfy-nodes pack, this one is a thin wrapper over the Civitai Orchestration API. It sends your media up, Civitai's captioning model writes the caption, and the node returns it as a plain STRING. The pack's README slots it under Civitai/Text alongside prompt enhancement and chat - this is the "make text from media" family, and it's all cloud-side.

What it's good at, grounded in how captioning works: generating the natural-language caption files that LLM-encoded bases (Flux, Z-Image, and friends) want for training, and seeding img2img or image-to-video prompts from an existing image. That second use is a classic graph pattern - captioner feeding a prompt enhancer feeding a generator.

Inputs and outputs

  • media_url (required) - the type is IMAGE, and the tooltip spells it out: "The URL of the media to caption (single image or video)." The name says URL but the socket is a media input; you can wire a Load Image's output here. It also accepts video, which is nice for building training captions for video models.
  • temperature - 0.5 default; sampling temperature for caption generation. Lower = more deterministic.
  • max_new_tokens - 300 default. That's plenty for a descriptive caption; bump it only if you're asking for long structured output.
  • custom_instructions - this is the input that makes the node worth more than the website's button. Extra instructions appended to the captioning prompt to steer tone or structure - "describe the lighting," "use tags," "keep it under 30 words." Leave unset for the default caption.

Outputs: caption (STRING - wire it into a prompt box, a text concat, a caption-file saver, or an LLM node), plus workflow_id and raw_json for debugging.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/civitai/civitai-comfy-nodes.git
pip install -r civitai-comfy-nodes/requirements.txt

Or ComfyUI Manager → "Civitai Comfy Nodes" → Install → restart. Authenticate with CIVITAI_API_TOKEN (headless) or the sidebar connect panel. Jobs are billed in Buzz per call.

Gotchas - read before you caption a dataset

The honest caveat from the KB's captioning section applies to every VLM, cloud or local: multi-subject attribution goes wrong - two people in frame and it mixes up who wears what. And a cloud captioner is filtered at the source. This is the one you should think hardest about if you're captioning anything near the boundary: the model is Civitai's, running Civitai's policy, and there's no local weights to abliterate. The community's uncensored-captioning default (JoyCaption) exists precisely because the API path can't do that work. If your dataset is SFW, this node is a perfectly good way to bulk-caption without spending VRAM. If it isn't, you already know the answer is local.

CategoryCivitai/Text

Inputs (5)

NameTypeDefaultDescription
media_urlIMAGEThe URL of the media to caption (single image or video).
temperatureoptFLOAT0.500–2147483647Sampling temperature for caption generation.
max_new_tokensoptINT3000–2147483647Maximum number of tokens to generate.
custom_instructionsoptSTRINGOptional extra instructions appended to the captioning prompt to steer tone, structure, or formatting. Leave unset for the default caption.
api_configoptCIVITAI_CONFIGOptional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login.

Outputs (3)

NameTypeDescription
captionSTRING
workflow_idSTRING
raw_jsonSTRING