Nodes/Together Vision Node/Together Vision Batch Node
ComfyUI Node

Together Vision Batch Node

Caption every image in a folder in one run

By theshubzworld·Created 2 years ago·Updated 9 months ago· 5
Together Vision Batch Node
    • STRING
    image_directory
    model_namedeepseek-ai/DeepSeek-R1-Distill-Llama-70B-free
    custom_model_name
    api_key
    system_promptYou 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_promptDescribe this image in detail, focusing on its visual elements, artistic style, and overall atmosphere.
    temperature0.70
    top_p0.90
    top_k0
    repetition_penalty1.10
    max_tokens512
    stop_sequences
    request_timeout30
    stream_timeout60
    use_cachetrue
    clean_output_texttrue
    max_retries2
    retry_delay3.0

    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-Turbo if you actually want the images seen - the free defaults are text-only.
    • api_key - paste it, or set TOGETHER_API_KEY in 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 .txt files. 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.
    Categoryvision

    Inputs (18)

    NameTypeDefaultDescription
    image_directorySTRING
    model_nameCOMBOdeepseek-ai/DeepSeek-R1-Distill-Llama-70B-free5 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_nameSTRING
    api_keySTRING
    system_promptSTRINGYou 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_promptSTRINGDescribe this image in detail, focusing on its visual elements, artistic style, and overall atmosphere.
    temperatureFLOAT0.700–2
    top_pFLOAT0.900–1
    top_kINT00–100
    repetition_penaltyFLOAT1.100.5–2
    max_tokensINT51216–4096
    stop_sequencesSTRING
    request_timeoutINT305–120
    stream_timeoutINT6010–300
    use_cacheBOOLEANtrue
    clean_output_textBOOLEANtrue
    max_retriesINT20–5
    retry_delayFLOAT3.00.5–10

    Outputs (1)

    NameTypeDescription
    STRINGSTRING