Preview Image and view Properties-SG
A Preview Image that tells you what you're actually looking at
- images
- image
- batch_count
- width
- height
- width_ratio
- height_ratio
- Resolution_in_MP
Preview Image is one of the most-used nodes in ComfyUI, and it's also one of the dumbest in a good way: it just shows you a picture. This is Preview Image with a spec sheet bolted on. Same job - display the image on the canvas wherever you want to eyeball a result, usually right after VAE decode - except it also prints the dimensions, megapixels, aspect ratio, batch count, and the in-memory tensor size on the node itself.
You reach for it when you're iterating on resolution and want the numbers next to the picture. Stuck deciding whether 1344×768 is close enough to the 3:2 you were aiming for? The node prints the ratio, matched against standard labels like 16:9, and you don't have to tab out to a calculator. It's a debugging-plus-preview tool, and the preview half means you don't lose the visual you'd get from the stock node.
How it works
The mechanism is refreshingly boring, which is the point. It's a passthrough: the IMAGE tensor goes in, the same tensor comes out, no pixels touched. On execution it reads the tensor shape - [batch, height, width, channels] - computes megapixels, reduces the aspect ratio with a GCD, and matches it against a table of standard ratios with a 5% tolerance so a slightly-off crop still gets a sensible label. Then it paints the lines onto the node canvas via the pack's JS extension, and saves temporary PNGs to ComfyUI's temp folder for the preview, same as any preview node.
One thing to know about the size it reports: that's the tensor size, the uncompressed float32 image in memory - width × height × 4 bytes per channel. A 1024×1024 RGB image reports around 12 MB, which is not what the file will weigh on disk. Useful for estimating VRAM, meaningless for estimating file size. Don't confuse the two.
Inputs and outputs
One required input: images (an IMAGE tensor, straight off VAE decode or anything else). Outputs:
image- the identical passthrough tensor, so you can keep wiring into whatever comes next.batch_count- how many images are in the batch. Handy for confirming a batched generation actually produced what you think.width,height- pixel dimensions as INTs.width_ratio,height_ratio- aspect ratio as two FLOATs.Resolution_in_MP- megapixels.
Because image passes straight through, you can slip this node into an existing pipeline without re-routing - it's a drop-in for Preview Image that happens to also hand you numbers.
Installing and the one real gotcha
Same install as the rest of the pack: Manager → Custom Nodes Manager → search "ComfyUI-Image_Properties_SG" → Install → restart, or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ShammiG/ComfyUI-Image_Properties_SG
No extra dependencies, no models, nothing to download.
The gotcha is the frontend, shared across the pack: on ComfyUI 0.3.76+, Node 2.0 must be switched off or the property text won't render - the JS targets the legacy canvas API, and the author has said a Vue port is a ~2000-line rewrite he's not committing to. If the preview shows but the numbers don't, that's exactly what's happening. Also note the properties only populate after the node runs - passthrough nodes are lazy, and until execution there's nothing on the canvas but the image itself.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| batch_count | INT | — |
| width | INT | — |
| height | INT | — |
| width_ratio | FLOAT | — |
| height_ratio | FLOAT | — |
| Resolution_in_MP | FLOAT | — |