Nodes/comfyUI-tool-2lab/Show image size & count (2lab)
ComfyUI Node

Show image size & count (2lab)

Finally, a node that tells you your batch size

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
Show image size & count (2lab)
  • image
  • image
  • width
  • height
  • count

Half of debugging ComfyUI is staring at an image batch and wondering how many frames are actually in it. ShowImageSizeAndCount (2lab) exists to answer that in one glance: feed it an image, and it reports the width, height, and batch count - and passes the image through untouched. It's the "am I even getting what I think I'm getting" node.

This one earns its place twice over. In single-image workflows it's a quick sanity check on resolution (especially when an upstream upscale or crop node surprises you). In video and batch workflows it's close to essential, because knowing the frame count before you hit a KSampler is the difference between a clean run and a cryptic tensor-shape error mid-queue.

Inputs and outputs

Just one input:

  • image - any IMAGE tensor, single image or batch.

Four outputs:

  • image - the same image, passed through untouched. You can tee off this and keep the rest of your graph wired without adding reroutes.
  • width - pixel width of the image.
  • height - pixel height.
  • count - number of images in the batch (for a video, that's your frame count).

The width/height/count ints are genuinely useful, not just decorative. You can feed them into conditional logic, aspect-ratio math, or a node that needs to know the batch size to plan its work.

How it works

Under the hood it reads the tensor's shape and pulls out the dimensions. ComfyUI stores image batches as a single tensor whose first axis is the batch/frame dimension, so count is literally that axis length. No resampling, no analysis - it's a measuring tape, not a microscope.

Installing it

Same as every node in this pack. ComfyUI Manager → search "comfyUI-tool-2lab" → install, or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/AI2lab/comfyUI-tool-2lab

Restart ComfyUI. No model downloads, no pip extras - pure Python utility.

Gotchas

  • Count is the batch dimension, not pixels-per-frame. count tells you how many images are stacked in the tensor. If you're after total pixels you multiply yourself; the node won't do it for you.
  • The pack's visibility issue applies. The GitHub repo currently returns 404 (likely made private or renamed), so a fresh clone may fail even though the nodes work fine in installed setups. Not your fault - just know it if your install balks.
  • It's read-only. It won't change or fix your images. If the count looks wrong, the bug is upstream in whatever built the batch, and this node is just the honest witness.
Category☁️2lab/image

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (4)

NameTypeDescription
imageIMAGE
widthINT
heightINT
countINT