Image Info Extractor
Read an image's size, format, and file details
- images
- width
- height
- batch_size
- channels
- file_name
- file_format
- file_size
- color_mode
- status
Image Info Extractor tells you the boring-but-necessary facts about an image: how wide, how tall, how many in the batch, how many channels, what format the file is, how big it is on disk, its color mode. In a batch workflow those numbers are exactly what you need to make decisions - resize this one, skip that one, log the dimensions so you can spot the odd file out of a thousand.
It's one of the pack's experimental extras (the README documents the queue and loader nodes and calls the rest test pieces), but of the experimental bunch this one's about as straightforward as it gets - it reads metadata and hands it to you. No hidden state, no loop mechanics, nothing to reset.
How it works
It takes a couple of things: the image tensor itself (for the live dimensions and batch/channel counts that ComfyUI already has in memory) and a file path (for the on-disk facts like format and file size that only exist by actually looking at the file). Between the two it can report both the "what's in the graph right now" numbers and the "what the source file is" numbers.
The inputs that matter
- images - the image to inspect. This drives width, height, batch size, and channel count.
- image_path - the path to the source file, used for the file-level details (format, size on disk, filename, color mode). If you only wire the image and not the path, expect the tensor-derived numbers to be solid and the file-derived ones to be blank or best-effort.
Outputs are a spread of facts: width, height, batch_size, channels, file_name, file_format, file_size, color_mode, and status. Grab whichever ones you need - width/height into a conditional resize, file_format or file_size into a log or a filter.
Installing it
cd ComfyUI/custom_nodes && git clone https://github.com/aidec/Comfyui_TextBatch_aidec, then restart ComfyUI (or ComfyUI Manager → Install via Git URL). No models, no heavy dependencies. Category: TextBatch.
Where people get burned
- The file details need the path. Width and height come from the image tensor, but format, file size, and color mode come from the actual file - so if
image_pathis empty or wrong, those outputs won't be meaningful. Feed it the real path (the pack's loaders emit one you can wire straight in). - Path is server-side. On a hosted or serverless ComfyUI,
image_pathhas to point at the server's filesystem, not your local machine. - Batch size is the tensor's, not the folder's.
batch_sizereports how many images are in the tensor you handed it - if you're iterating one at a time it'll say 1. That's correct, just don't mistake it for "how many files are in the folder"; the loaders'total_files/countoutputs are what you want for that. - Experimental tier. Thin on docs and error handling like the rest of the extras - but this one is simple enough that trial and error costs you nothing.
Not exciting, occasionally exactly the node that lets a batch make a decision instead of blindly processing everything the same way.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| image_path | STRING | — |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| batch_size | INT | — |
| channels | INT | — |
| file_name | STRING | — |
| file_format | STRING | — |
| file_size | STRING | — |
| color_mode | STRING | — |
| status | STRING | — |