Nodes/ComfyUI-SiberiaNodes/Siberia 多图片输入器 / Multi Image Input
ComfyUI Node

Siberia 多图片输入器 / Multi Image Input

The Siberia Multi Image Input, and the black-image trap it hides

By siberiah2o·Created 10 months ago·Updated 10 months ago· 0
Siberia 多图片输入器 / Multi Image Input
  • image_1
  • 图片张量列表 / Images Tensor List
input_count2

The Siberia Multi Image Input does one job, and it does it specifically for the pack's vision node: it gathers between one and eight images and stacks them into a single batch tensor so the Ollama Vision node can look at all of them in one request. If you've ever tried to caption a reference sheet or compare three frames, you know why that matters - most vision nodes take one image, and feeding a batch means a whole loop around them.

How the dynamic inputs work

The only always-required input is input_count, an integer from 1 to 8 (default 2). That number controls how many image_1 through image_8 sockets the node shows. The trick is that those inputs are created and destroyed by the node's JavaScript, not by the backend - the info_schema only declares image_1, and the JS adds or removes the rest as you change the count. Under the hood the node also stacks the images with torch.stack along the batch dimension, so what comes out the single 图片张量列表 / Images Tensor List output is one IMAGE tensor with N images in it.

That stacked tensor is exactly what the Siberia Ollama Vision node's images input is built to eat - it handles both a normal 4D batch and the 5D shape a stack can produce, then sends them all to the model in one base64 request. So the intended pipeline is: several Siberia Image Loaders → this node → Ollama Vision → Universal Display. The pack ships a two-image workflow like that in Workflow-Examples/多图反推工作流.json.

Where it's fiddly

Changing input_count doesn't just resize the node - the JS actually deletes the node and rebuilds it, then tries to restore your connections. "Tries" is doing a lot of work there. Wires to image inputs can silently drop during the rebuild, especially if you change the count after wiring things up. The practical habit: set input_count first, then connect your images, and spot-check that the wires survived any later count change.

Two more gotchas worth knowing:

  • Mixed image sizes break it silently. torch.stack needs all tensors the same shape. Feed it a 1024×1024 and a 768×768 and the stack throws - and the exception handler catches it and returns a 1×64×64×3 tensor of zeros. No error box, just a black batch downstream. Resize your images to a common size before the stack.
  • No valid inputs at all → also black. Every input empty or unconnected yields the same silent zero-tensor fallback, with the "No valid images found" message going only to the console. If your vision result describes a black rectangle, start here.

Install

It ships with the whole ComfyUI-SiberiaNodes pack:

cd ComfyUI/custom_nodes
git clone https://github.com/siberiah2o/ComfyUI-SiberiaNodes.git
cd ComfyUI-SiberiaNodes
pip install -r requirements.txt

Restart ComfyUI; the node lives under Siberia Nodes/Image. Manager users search "ComfyUI-SiberiaNodes". No extra models to download for this node itself - the heavy lifting happens later in the vision node's Ollama model.

Should you use it?

If you're building a multi-image analysis workflow inside this pack, it's the intended glue and it's fine. If you're doing this outside the pack, there are less clever ways to batch images that don't rebuild your graph every time you change a number. Just remember the two silent-black-image failure modes - same-sized inputs, and a count set before you wire - and it'll behave.

CategorySiberia Nodes/Image

Inputs (2)

NameTypeDefaultDescription
input_countINT21–8输入数量 / Number of image inputs (1-8)
image_1optIMAGE

Outputs (1)

NameTypeDescription
图片张量列表 / Images Tensor ListIMAGE