ℹ️ Image Info
Read a file's metadata, EXIF, and size by path
- info
This node reads properties straight off an image file - its format, color mode, dimensions, DPI, and any embedded metadata or EXIF - and returns them as a string. The key detail that makes it useful: it works from a file path, not a loaded IMAGE. That matters because the moment ComfyUI loads an image into a tensor, all the sidecar information (EXIF, PNG text chunks, the embedded workflow) is gone. Reading from the path preserves it, so this is how you inspect what's actually baked into a file on disk.
The obvious use is forensics on a generation: pull the embedded metadata to see what prompt or workflow produced an image. But it's just as handy for the boring stuff - confirming a file is really RGB and not RGBA before it breaks a downstream node, or checking dimensions and DPI without opening the file elsewhere.
How it works
You give it a path and pick which property you want. It opens the file, reads that one attribute, and returns it as text. Because it's reading the file directly, it can surface things a tensor can't - EXIF from a camera, the parameters/workflow text A1111 and ComfyUI embed in PNGs, the DPI a print pipeline cares about.
The inputs and outputs that matter
img_path- the path to the file on disk. This is the whole trick; point it at the actual file.info_type- which property to read:name,img_type,img_format,color_mode,image_size,dpi,metadata, orexif_data. Pick one per node; chain several if you want multiple facts.
Output is info (STRING). Wire it into a text/preview node to display it, or into logic that branches on the value (e.g. only proceed if color_mode is RGB).
How to install it
ComfyUI Manager: search SDVN_Comfy_node, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root, and restart. It's under SDVN → Info_check.
Common issues & troubleshooting
metadata or exif_data comes back empty. Not every file carries it. EXIF is a camera/photo thing - a freshly generated PNG usually has none. And many web images are stripped of EXIF on upload. An empty result is often correct, not a bug. For AI generations, the useful field is usually metadata (the PNG text chunks), not exif_data.
File not found. It needs a path it can actually reach from where ComfyUI runs. Use a full/absolute path, or one relative to the ComfyUI working directory, and mind OS path separators.
I loaded the image into a node and it lost the info. Right - that's exactly why this node exists. Read from the path before/instead of loading it as an IMAGE, because the tensor doesn't carry the sidecar data.
Reading a whole folder. This node reads one file at a time. To scan many, drive img_path from a list of paths upstream.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| img_path | STRING | Đường dẫn tới ảnh. | |
| info_type | COMBO | Loại thông tin cần đọc. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| info | STRING | Thông tin ảnh. |