Nodes/ComfyUI_DW_Chat/SD3 Long Captioner V2
ComfyUI Node

SD3 Long Captioner V2

Long-form captions for SD3-era training, in one dead-simple node

By yiwangsimple·Created 2 years ago·Updated about a year ago· 89
SD3 Long Captioner V2
  • image
  • caption
promptDescribe in detail what's in this image.

The SD3 Long Captioner V2 is the pack's specialist: it exists to write long, detailed captions - the kind that describe composition, lighting, and subject in flowing sentences rather than tags. It runs gokaygokay/sd3-long-captioner-v2, a fine-tune of Florence-2 (large) trained to caption in the long-form style that SD3-class models expect. It's one of the captioners in yiwangsimple/ComfyUI_GroqChat, sitting alongside the PaliGemma node in the pack's ImageToText group.

Why use it? If you're assembling a training dataset for an LLM-encoder model - SD3, Flux, Qwen-Image, that family - the KB's lora-training essay is blunt: for those architectures you want natural-language captions, and the longer and more descriptive, the better. This node is basically one click of that. It's also handy as in-graph alt-text if you're documenting what a workflow produced.

How it works

First run downloads the model from Hugging Face into ComfyUI/models/LLavacheckpoints/files_for_sd3_long_captioner_v2 - yes, the folder name is a leftover from the pack's LLaVA era; ignore the "LLava" in the path and let it do its thing. It loads via AutoModelForVision2Seq, feeds your image and prompt to the processor, and generates up to 512 tokens with repetition_penalty set to 1.05 and greedy decoding (do_sample=False).

Two behavioral notes from the code: it unloads the model from VRAM after every run - there's no keep-alive toggle here, unlike the PaliGemma node in the same pack - and greedy decoding means the same image plus the same prompt always gives the same caption. For dataset work that determinism is fine, even desirable.

Inputs and outputs

This is about as thin as a node gets: image and prompt (default "Describe in detail what's in this image."). That's the entire input surface. Output is a single caption STRING. If you want variation, control, or sampling, the PaliGemma captioner in the same pack is the more capable sibling - this one is a focused tool for one job.

Installing it

Same as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/yiwangsimple/ComfyUI_GroqChat

Restart ComfyUI, or install "ComfyUI_DW_Chat" via ComfyUI Manager. The requirements (transformers, torch, huggingface_hub, Pillow) are already in any working ComfyUI install, so the only real download is the model itself on first use.

Common issues

Honestly, it's a low-friction node - the main complaints are performance, not breakage. Because the model reloads on every execution, captioning a large batch is slow; let it run overnight and treat it as a batch job rather than something interactive. If you're captioning thousands of images for training, a purpose-built tool like JoyCaption will run circles around this in throughput. But for grabbing a rich, SD3-style caption for a handful of images without leaving ComfyUI, it does exactly what it says.

Category🌙DW/ImageToText

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
promptSTRINGDescribe in detail what's in this image.

Outputs (1)

NameTypeDescription
captionSTRING