Nodes/Qwen2.5-VL GGUF Nodes/📦 Batch Remote VLM Task
ComfyUI Node

📦 Batch Remote VLM Task

Caption a whole folder without babysitting a single-image node 500 times

By walke2019·Created 11 months ago·Updated about a month ago· 32
📦 Batch Remote VLM Task
  • model_config
  • images
  • results_json
  • results_text
taskCaption
max_items16
max_tokens1024
temperature0.2
timeout300
custom_prompt

The single-image Remote VLM Business Task is fine for testing one image. The moment you need captions, OCR, or structured JSON for a whole dataset, you want this node. Batch Remote VLM Task takes an IMAGE batch and runs the same remote VLM job over every frame, collecting the results into two strings: one JSON array for machines, one formatted text blob for your eyes.

It's the pack's answer to "I have 2,000 images and I don't want to click Run 2,000 times." Same five task modes as the single-image runner (Caption, OCR, Prompt Reverse, JSON, Custom), same model config input, but with an images port instead of a single image.

What you get out

  • results_json - a JSON array, one object per image: {"label": "caption_0001", "index": 0, "result": "...", "error": ""}. This is the one you feed to JSON Result Validator or save to disk.
  • results_text - the same content as labeled, human-readable blocks separated by blank lines, for eyeballing.

The labels are auto-generated per task - caption_0001, ocr_0002, and so on - so your dataset rows get stable identifiers even if your source filenames are a mess.

The inputs that matter

  • model_config - the REMOTE_VISION_MODEL from the config node. Required, obviously.
  • task - the five-mode dropdown.
  • max_items - caps how many of the batch's frames get processed, default 16, up to 256. This is your batch-size guardrail; a huge IMAGE batch will happily run until it hits this.
  • max_tokens / temperature / timeout - same as the single-image node; low temperature (0.2) is right for batch work.

Per-item failure handling is the quietly good part. If one image times out or the server chokes, that row gets an error field and the loop keeps going - one bad frame doesn't kill your run, and you can spot the failures in results_text afterward. (Source is in nodes/business_nodes.py if you want to verify the loop.)

Where people get burned

Batch loops are slow, and this one is sequential - one request at a time, each with a timeout of up to 300s. A batch of 256 at 5 seconds each is over twenty minutes of staring at the progress bar. Plan the max_items cap around how long you're willing to wait, and consider that this is exactly the workflow where you want a fast remote model rather than a 7B quant on a CPU.

Also: the node is OUTPUT_NODE = True, which means it's terminal - it renders results to the UI. That's correct for this job, but it means you can't wire its output into more nodes and have it render; if you want to chain, use the results text downstream of a Show Text-style node instead.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/walke2019/ComfyUI-GGUF-VLM.git
cd ComfyUI-GGUF-VLM
pip install -r requirements.txt

Restart ComfyUI. It sits under GGUF-VLM → 🚀 Business. Feed it via an image batch - a Load Images from Directory node, or this pack's Dynamic Multi-Image Collector.

Troubleshooting

If results_json comes back as [], you didn't feed an images batch - the node returns an empty array when images is None rather than erroring, which is easy to miss. If every row has an error about the service, your server isn't reachable or the model name in the config is stale - hit Refresh in the config node. And if you see a few errors sprinkled through an otherwise good batch, that's the timeout fighting a slow model on a busy machine; bump timeout to 600s.

Category🤖 GGUF-VLM/🚀 Business

Inputs (8)

NameTypeDefaultDescription
model_configREMOTE_VISION_MODEL
taskCOMBOCaption5 options: Caption, OCR, Prompt Reverse, JSON, Custom
max_itemsINT161–256
max_tokensINT10241–8192
temperatureFLOAT0.20–2
timeoutINT30030–1800
imagesoptIMAGE
custom_promptoptSTRING

Outputs (2)

NameTypeDescription
results_jsonSTRING
results_textSTRING