Fix Batch Images
The boring node that lets Qwen look at your whole batch at once
- image1
- image2
- batched_images
- exists
The name undersells it, but Fix Batch Images is the difference between a Qwen3-VL prompt that sees one image and one that sees your whole scene at once. The Simple QwenVL node in this pack takes a single image input - but that input accepts a batch, and the pack's whole philosophy is "load the model, run, unload it, don't leave dead weight in VRAM." So the efficient move is to cram everything you want analyzed into one batch before the LLM node, so it runs once instead of reloading a multi-gigabyte model per frame. That's this node's job: it collects a couple of IMAGE inputs, forces them all to the same resolution, and concatenates them into one tensor you can drop straight into the model.
Why it has to exist
ComfyUI's IMAGE type is rigid. A batch is a single tensor where every frame must share the same height, width, and channel count - torch.cat flat-out refuses to stack a 1024×1024 with a 768×512. That bites the moment your workflow has two sources: a LoadImage at one resolution and a video's frames at another, or a reference image plus a generated one. Without a normalization step you simply can't wire them together. Fix Batch Images is that step, and it's general enough to use in front of any node that wants a uniform batch, not just the Qwen one - the author just happened to need it for his own multi-image prompting.
How it works
Under the hood it's dead simple. The first non-empty image on image1/image2 (it collects every image* slot) sets the target size. Every later image gets compared against it, and if there's a mismatch, resize_mode decides the fate:
- crop (default) - center-crops to the target aspect ratio, then resizes. Best default for a captioner, since it preserves the pixels that matter.
- stretch - distorts to fit. Fine for a tiny util, ugly for content.
- pad_black - letterboxes, keeps proportions, adds black bars.
- ignore - silently drops any image that isn't already the target size.
If nothing comes in valid, fallback_mode kicks in: black_64x64 (default) and black_1x1 hand the model a black placeholder, empty_batch gives a zero-length batch, and none returns nothing at all.
Outputs are batched_images (the concatenated IMAGE, or the fallback) and exists, a boolean that's true only when at least one real image made it in.
The two knobs that matter
resize_mode and fallback_mode are the only required inputs, and you'll mostly touch the first one. The one genuine trap: the first image wins. Whatever lands on image1 sets the target size, so put your primary/reference image there, not a weird crop. And if you set resize_mode to ignore with mixed-resolution sources, you can end up with a one-image batch and no error to explain it - mismatches just get discarded.
Installing it
Same install as the rest of the pack: ComfyUI Manager → search ComfyUI_Simple_Qwen3-VL-gguf, or
cd ComfyUI/custom_nodes
git clone https://github.com/KLL535/ComfyUI_Simple_Qwen3-VL-gguf
then restart ComfyUI and refresh the frontend. Fair warning: this pack's real dependency is llama-cpp-python from the JamePeng fork (≥0.3.17), because the stock PyPI build still doesn't support Qwen3-VL. That's a compile-from-source adventure on Windows (CUDA Toolkit, MSVC, ~30–60 min builds) and it's the usual source of "followed the instructions, no text comes out" posts about this pack. Fix Batch Images itself only needs pillow/opencv, but you're not installing the pack for a resize util - you'll hit the llama-cpp build eventually.
A node this small rarely fails on its own. When people get stuck with this pack it's almost always the llama-cpp install, the model path in the config, or feeding mixed sizes into the LLM node directly - which is exactly the case this node exists to fix.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| resize_mode | COMBO | crop | 4 options: stretch, crop, pad_black, ignore |
| fallback_mode | COMBO | black_64x64 | 4 options: none, empty_batch, black_1x1, black_64x64 |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| batched_images | IMAGE | — |
| exists | BOOLEAN | — |