Image Size
The tiny plumbing node that reads width, height, and batch count
- image
- width
- height
- count
This isn't a node you look at directly - it's a node you wire into something else that needs to know how big your image is. Feed it an image, get back its width, height, and how many images are actually in the batch, each as its own number you can plug into math nodes, EmptyLatentImage, resize nodes, or a conditional switch further down the graph.
How it works
There's no image processing happening here at all. It reads the shape of the tensor coming in and hands the numbers back out as plain integers. That's the whole node - which is exactly why it's useful: it turns "whatever size this image happens to be" into values you can actually compute with, instead of hardcoding numbers and hoping you guessed right.
The obvious use is matching your latent resolution to an input image instead of eyeballing it - wire width/height straight into EmptyLatentImage so your generation always matches whatever image came in, no manual re-typing when your source changes. The less obvious one is count: if an upstream node in your graph is supposed to output a batch, wiring count somewhere visible (or into a conditional) is a cheap sanity check that it actually did, instead of finding out three nodes later that you got one image instead of eight.
The inputs and outputs that matter
image(required IMAGE) - the only input, and there's nothing to configure on this node at all.
Outputs:
width(INT)height(INT)count(INT) - the batch size.
How to install it
Via ComfyUI Manager: search ComfyUI-tbox, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ai-shizuka/ComfyUI-tbox
then restart. Nothing to check against a dependency list for a node this small - the pack's README is essentially blank (three section headers, no content), but a pure metadata-read node like this one has no models or dependencies to be missing in the first place.
Common issues & troubleshooting
Node errors instead of returning numbers. The most common cause is that whatever's feeding image isn't actually an IMAGE type - a frequent mistake is wiring in a LATENT before it's been decoded through a VAE. Trace back to what's actually connected.
Values come back as 0 or look wrong. Same root cause as above - double-check the upstream node is really producing images, not something that only looks like one on the canvas.
Your ComfyUI canvas stopped floating, or scroll-wheel zoom broke, after you installed this pack. Not this node's fault - it's a known conflict between one of tbox's own image-loading nodes and ComfyUI's frontend, documented on the pack's GitHub issues and cross-referenced against a core ComfyUI issue. If your canvas gets weird right after adding tbox, that's the first thing to suspect; disable tbox's nodes a few at a time to isolate it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| count | INT | — |