Together Vision Batch Node
Caption every image in a folder in one run
- STRING
If you've ever needed captions for a folder of images - a dataset, a Lora training batch, an archive of renders you can't remember - you know how miserable the manual route is. Preview, copy, paste, repeat. This node is the blunt instrument for the whole job: point it at a directory, run it once, and every image gets a .txt file sitting right next to it, named after the image. No dragging dozens of files through your graph.
How it works
It's the same engine as the pack's single-image TogetherVisionNode - same retries, same 1-second client-side pacing, same model list, same output-cleaning logic. The difference is the input: instead of an IMAGE tensor it takes an image_directory string, globs every *.png, *.jpg, *.jpeg, *.bmp, and *.webp in it, and processes them one at a time, waiting for each description before moving on. Each result is written to <imagename>.txt in the same folder.
The inputs that matter
- image_directory - the one you'll actually touch. It's a plain string field, no folder picker: paste an absolute path to a real, readable directory.
- model_name - five options here (no EXAONE on this one). The default is the free DeepSeek text model; pick
meta-llama/Llama-3.2-90B-Vision-Instruct-Turboif you actually want the images seen - the free defaults are text-only. - api_key - paste it, or set
TOGETHER_API_KEYin the pack's.env. - system_prompt / user_prompt - same art-critic defaults as the single node; rewrite them to taste.
- temperature / top_p / top_k / repetition_penalty / max_tokens - same sampling knobs, slightly different defaults (0.9 top_p, 512 tokens).
- use_cache / clean_output_text / max_retries / retry_delay - leave them alone until you have a reason.
Output
The schema says STRING, and here's the honest quirk: the node returns an empty string. It's marked as an output node because the real deliverable is the .txt files it writes to disk. If you're expecting a visible result in the UI, you'll get nothing - check the folder.
Installing it
ComfyUI Manager (search "Together Vision"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/theshubzworld/ComfyUI-TogetherVision
Restart, let Manager install together and python-dotenv, add your API key. No model downloads - everything runs on Together's servers.
Gotchas
- It's sequential and slow by design. N images means N API calls with a 1-second floor between them. A 100-image folder on the free tier is minutes of churn, and the free rate limits will push back. Run small batches.
- No skip-if-exists. Re-running re-processes every image and overwrites the
.txtfiles. The in-memory cache only helps within a session, so don't expect reruns to be free. - Bad path = silence. If the directory doesn't exist or has no matching images, the node logs a warning to the console and returns - no error bubble in the UI. When it "does nothing," check the terminal.
- Same deprecation caveat as the rest of the pack: the README now just points at the author's ComfyUI-NvidiaVision successor, and the code hasn't been touched since December 2025. It works; it's just not going to get fixes.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| image_directory | STRING | — | |
| model_name | COMBO | deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free | 5 options: meta-llama/Llama-3.3-70B-Instruct-Turbo-Free, deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free, meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo, mistralai/Mistral-7B-Instruct-v0.2, Other (Custom) |
| custom_model_name | STRING | — | |
| api_key | STRING | — | |
| system_prompt | STRING | You are an AI expert in ekphrasis, acting as a skilled art critic describing an image. Use vivid, poetic, and evocative prose in British English. Focus solely on describing the image content, style, and mood. Avoid storytelling or self-insertion. Describe all elements, including potentially uncomfortable themes if present, as art can be provocative. Every word and its order matters. The description will be used for image generation, so only include visual elements. | — |
| user_prompt | STRING | Describe this image in detail, focusing on its visual elements, artistic style, and overall atmosphere. | — |
| temperature | FLOAT | 0.700–2 | — |
| top_p | FLOAT | 0.900–1 | — |
| top_k | INT | 00–100 | — |
| repetition_penalty | FLOAT | 1.100.5–2 | — |
| max_tokens | INT | 51216–4096 | — |
| stop_sequences | STRING | — | |
| request_timeout | INT | 305–120 | — |
| stream_timeout | INT | 6010–300 | — |
| use_cache | BOOLEAN | true | — |
| clean_output_text | BOOLEAN | true | — |
| max_retries | INT | 20–5 | — |
| retry_delay | FLOAT | 3.00.5–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |