ComfyUI Node
DIGIT Batch Caption
Batch caption images in a folder using Gemini via Vertex AI. Saves .txt files next to each image.
DIGIT Batch Caption
- log
- captioned_count
- folder_path
◄image_folder►
◄modelgemini-2.5-flash►
◄caption_styletraining_detailed►
◄caption_lengthlong►
◄overwritefalse►
◄gcp_project_id►
◄gcp_region►
◄trigger_word►
◄prefix_text►
◄suffix_text►
◄custom_prompt►
◄system_prompt►
◄max_tokens1024►
◄temperature0.40►
◄max_dimension2048►
◄delay_seconds0.5►
CategoryDIGIT
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| image_folder | STRING | Path to folder containing images to caption. | |
| model | COMBO | gemini-2.5-flash | 9 options: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash, gemini-2.0-flash-lite, gemini-3.1-pro-preview, +3 |
| caption_style | COMBO | training_detailed | 7 options: descriptive_formal, descriptive_casual, training_detailed, training_concise, booru_tags, prompt_style, +1 |
| caption_length | COMBO | long | 4 options: short, medium, long, any |
| overwrite | BOOLEAN | false | Overwrite existing .txt caption files. If false, skips images that already have captions. |
| gcp_project_id | STRING | GCP project ID. Auto-detected from DIGIT_GCP_PROJECT env var or GCP metadata. | |
| gcp_region | STRING | GCP region. Auto-detected from DIGIT_GCP_REGION env var or GCP metadata. Defaults to 'global'. | |
| trigger_wordopt | STRING | Trigger word prepended to each caption. Connect from LoRA Loader or type manually. Leave disconnected to skip. | |
| prefix_textopt | STRING | Text injected at the START of every caption (after trigger word). Useful for consistent style tags. | |
| suffix_textopt | STRING | Text injected at the END of every caption. Useful for quality tags or consistent endings. | |
| custom_promptopt | STRING | Custom prompt used when caption_style is 'custom'. Also appended as extra instructions for other styles. | |
| system_promptopt | STRING | Optional system prompt override. If empty, a default captioning system prompt is used. | |
| max_tokensopt | INT | 102464–8192 | — |
| temperatureopt | FLOAT | 0.400–2 | — |
| max_dimensionopt | INT | 2048512–4096 | Resize images to this max dimension before sending to API (saves bandwidth). |
| delay_secondsopt | FLOAT | 0.50–10 | Delay between API calls to avoid rate limiting. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| log | STRING | — |
| captioned_count | INT | — |
| folder_path | STRING | — |