Nodes/Strata-T8/Strata 图片批量 / Image Batch
ComfyUI Node

Strata 图片批量 / Image Batch

Caption eight images on one model load

By T8mars·Created 21 days ago·Updated 10 days ago· 20
Strata 图片批量 / Image Batch
  • connection
  • images
  • results
  • paired_json
  • text_list
◄task▾►
◄question►
◄max_pixels1048576►
◄max_tokens1024►
◄temperature0.70►
◄top_p0.95►
◄top_k20►
◄seed0►
◄reasoning_effort▾►
◄refresh0►

Same vision model as StrataT8Image, different shape. Where the Vision node sends one request with up to eight images attached and gets one answer about the group, this one fires one request per image - sequentially, inside a single model lease - and gives you a list of answers plus a per-image record of what happened.

Why that matters

Loading and unloading a large local model is the expensive part of any captioning job, not the inference. Running eight separate Vision nodes means eight chances to load, and eight GPU handoffs where ComfyUI unloads its own models to make room. Batching them means one lease: the engine comes up, all eight images go through in order, then it releases and exits. If you're captioning a LoRA dataset, that difference is the whole point of the node.

How it works

The pack validates the task and sampling options first - before it copies a single image to the CPU - then converts every frame in the batch the same way the Vision node does (finite-value check, 8-bit quantise, RGBA flattened on white, Lanczos downscale to max_pixels), builds one chat request per image, and sends them in order. The number of requests is bounded, because the image encoder accepts at most 8 frames in a batch.

Inputs

It's StrataT8Image's input list minus schema, so:

  • connection - from StrataT8Connection.
  • images - up to 8. More than that is an error, not a queue.
  • task - caption, reverse_prompt, ocr, question, evaluate. The same five presets the Vision node uses; caption and reverse_prompt are the ones that earn their keep in bulk.
  • question - only meaningful for question/evaluate; becomes the prompt sent with each image.
  • max_pixels - 65536–4194304, default 1048576.
  • Sampling: max_tokens, temperature, top_p, top_k, seed, reasoning_effort, refresh. Note that sampling is shared across all eight requests - same seed, same settings. The outputs differ because the images differ, not because the temperature wobbled.

There's no schema here on purpose. If you want structured per-image output, run them one at a time through StrataT8Image with a schema; a batch of schema-constrained answers would be eight chances to fail validation instead of one.

Outputs

  • results - a native STRING list, one caption per image, in the order you fed them.
  • paired_json - a JSON array of records, each with index, output, reasoning and usage. This is the one to save if you're auditing a run: it's the only place the per-image reasoning and token counts survive.
  • text_list - the same strings as one STRATA_TEXT_LIST, for handing the whole batch to another node.

Because results is a native list, downstream nodes execute once per item. Wire it into a text-save node and you get a file per caption; wire it into a prompt node and you get one generated image per caption.

Install

Manager → search Strata-T8 (strata-t8, publisher t8star), or:

cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-Strata-T8.git
python -m pip install -r Comfyui-Strata-T8/requirements.txt

jsonschema is the only package added; vision reuses ComfyUI's existing Pillow/NumPy/PyTorch. Restart, then save a profile in the Strata-T8 sidebar with vision: gpu and pick it in Connection. The node pack ships no weights - the ~907MB BF16 vision encoder comes with the runtime's VisionReady release, and the main model data is a separate, much larger download.

Where people get burned

Eight is a hard ceiling. Both this node and the Vision node stop at eight images per run, because the shared image encoder is bounded there. A 40-image dataset means five runs - or just queue five batches and let the pack's locking serialise them.

Order is your responsibility. The images arrive in tensor order and the answers come back in the same order, with index in paired_json to prove it. If you loaded them from a folder in arbitrary order, results[0] is not "the first file alphabetically".

One bad image kills the batch. A NaN pixel or an oversized tensor errors the whole run before any inference - the validation happens across the full batch up front. Better than a half-caption set with no way to tell which files missed, but annoying when it's image 7 of 8.

Reasoning levels cost you twice. If you set reasoning_effort high and keep max_tokens at 1024, you can spend the budget thinking, and the pack then refuses the answer outright rather than returning an empty caption. With eight images, that's eight failures in a row.

CategoryStrata-T8

Inputs (12)

NameTypeDefaultDescription
connectionSTRATA_CONNECTION—
imagesIMAGE—
taskCOMBO5 options: caption, reverse_prompt, ocr, question, evaluate
questionSTRING—
max_pixelsINT104857665536–4194304—
max_tokensINT10241–131072—
temperatureFLOAT0.700–2—
top_pFLOAT0.950.01–1—
top_kINT201–64—
seedINT00–2147483647—
reasoning_effortCOMBO5 options: none, low, medium, high, xhigh
refreshINT00–2147483647—

Outputs (3)

NameTypeDescription
resultsSTRING—
paired_jsonSTRING—
text_listSTRATA_TEXT_LIST—