Nodes/comfyui-lsnet/Kaloscope Image Connector
ComfyUI Node

Kaloscope Image Connector

The humble 3-into-1 batch node

By spawner1145·Created 12 months ago·Updated 2 days ago· 104
Kaloscope Image Connector
  • image_1
  • image_2
  • image_3
  • stacked_images

Not every node in a pack is glamorous. Kaloscope Image Connector takes three IMAGE inputs and glues them into one IMAGE batch. That's it. If you already know that ComfyUI's own batch-image nodes do this, you're not missing anything - this is the pack's convenience version, and its opinionated behavior is worth thirty seconds of your time before it bites you.

Why it exists at all: the Kaloscope nodes that compare things - Common Features, Extract Features - want a batch, not three separate wires. If your three reference images come from three different Load Image nodes (or three different branches of an upscale chain), you need something to merge them. This is that something.

What it does, precisely

image_1, image_2, and image_3 in, stacked_images out. The behavior that matters is in the internals: if an input is already a batch, the node takes the first image of that batch and discards the rest, then concatenates the three survivors along the batch dimension. So it's strictly a 3-slot combiner, not a flattener - feed it three 20-image batches and you get three images, one from each, and no warning that you just threw away 57 pictures.

If you want more than three images in a batch, the doc points you at ComfyUI's own image batch-combine node rather than chaining connectors, which is sound advice; chaining would work but you'd be feeding the node a batch on every slot and walking straight into the first-image rule.

Output shape is what you'd expect: [3, H, W, C] in ComfyUI's standard IMAGE tensor, ready for Extract Features, Common Features, or anything else in the pack that takes a batch.

The one rule that breaks it

All three images must be the same resolution. ComfyUI's IMAGE type is a dense tensor - a batch is one array with a batch dimension, and you cannot put different-shaped pictures in the same array. Feed this node a 1024×1024 and a 832×1216 and it fails on the concatenate, with a shape mismatch you'll have to read carefully to diagnose.

That matters for style references especially, because real galleries are mixed aspect ratios. The fix is boring: run each image through a resize or a pad node sized to a common target before it reaches the connector, or point a single Load Image (Batch) style loader at pre-cropped copies. Pad-to-square usually beats stretch-to-square here, since a stretched image distorts the thing the model is trying to fingerprint - and these backbones resize to their own training resolution regardless, so 768×768 or 512×512 references lose you nothing.

The other unspoken rule is ordering. The node preserves slot order, so image_1 lands at batch index 0. That matters downstream: Common Features doesn't care about order, but anything that reports a reference_index or lines up labels against your images does. Decide that slot 1 is always the same kind of thing and you'll spend a lot less time squinting at JSON.

Install

Nothing separate - it ships with the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/spawner1145/comfyui-kaloscope
cd comfyui-kaloscope
python -m pip install -r requirements.txt

The GitHub URL redirects (the repo was renamed from comfyui-lsnet to comfyui-kaloscope), so either link works with Manager's "Install from Git URL." The dependencies are heavy for a node this simple - torch 2.4+, timm, scikit-learn, matplotlib, safetensors, and triton-windows on Windows - but that's the pack's cost for the model nodes, not this one. This node itself is pure tensor plumbing and will work fine even if you never download a Kaloscope checkpoint.

When you'd actually reach for it

Three is a weird number, and honestly that's the tell: the pack's comparison nodes are built around three groups (the group_1/group_2/group_3 slots on Feature Comparison and Clustering), so the author gave you a matching three-slot batcher. If your reference set is three folder-representatives, one per artist, this drops in cleanly. If it's fifteen images of one artist, skip it and use a batch loader - the connector would keep only the first of each slot-group anyway.

CategoryKaloscope

Inputs (3)

NameTypeDefaultDescription
image_1IMAGE—
image_2IMAGE—
image_3IMAGE—

Outputs (1)

NameTypeDescription
stacked_imagesIMAGE—