Read XMP Metadata
Pulling XMP metadata back out
- STRING
ComfyUI already stuffs its workflows into your PNGs - drag an image back in and the whole graph rebuilds. This pack deliberately stays out of that lane. The author says so right in the README: it's not for generation data, there are already plenty of nodes for that. It's for your tags, the Subject keywords and notes you want living inside the file so a viewer like XnView can search them. ReadXMPMetadata is the retrieval half of that idea.
So what does it actually do? If you've tagged images with this pack's write nodes - or with any XMP-aware tool - it pulls a field back out as plain text. Type in a path, pick what you want, and you get a STRING you can route anywhere in the graph. Stick it into a text display, feed it to a conditional, or just read it off the node. It's the read-your-own-notes node, not a full metadata inspector.
The mechanism is a thin wrapper around ExifTool, the same Swiss-army knife people already use to strip AI-generation data from images. The node shells out to exiftool to grab the four standard XMP fields it knows about - dc:Subject, dc:Description, xmp:CreateDate, xmp:ModifyDate - then hands you whichever you asked for. Set metadata_type to ALL and it runs a few ExifTool query variants, keeps the richest result, and prints it back as sorted key: value lines. Custom exists for when you know an exact field name; just know that outside of ALL, the node only queries those four standard fields, so that's where Custom usually lands in practice.
The inputs that matter:
image- the full path to the image file on disk. A path, not a tensor.metadata_type-Subject,Description,Create Date,Modify Date,Custom, orALL.custom_metadata- the field name you want, only used whenmetadata_typeisCustom.
Output is a single STRING. This isn't an output node, so it won't finalize the graph - it just returns text for whatever you wire it into.
Install is the same as the rest of the pack: in ComfyUI Manager search for "comfyui-too-xmp-metadata", or cd ComfyUI/custom_nodes && git clone https://github.com/tetsuoo-online/comfyui-too-xmp-metadata and restart. The pip deps are just pillow and numpy, which ComfyUI already has. The real dependency is ExifTool - more on that below.
Troubleshooting, the short version:
- "Error: ExifTool non trouvé" - ExifTool isn't installed or isn't on your PATH. On Windows the repo bundles an
exiftool.exe, so the pack mostly just works; on Linux/macOS you need tosudo apt install libimage-exiftool-perl(Debian/Ubuntu) orbrew install exiftool(macOS) yourself. - A path that doesn't resolve returns an error string. Give it the absolute path to the file; it can't read a batch or a directory.
- "No Subject Found" on a fresh image is normal - that's the honest "nothing tagged yet" answer, not a crash.
- You'll notice the node prints ExifTool's raw dump to your console every run. That's not you doing something wrong; the code has debug permanently flipped on for reads. Ignore it.
This is a small, single-purpose utility - the pack's personality is one guy's "tags live in the files, not in a database I can lose" project, and the read node is the "get them back out" end of that bargain. Use it with the lossless write node on your existing library and you've got a searchable image catalog that survives any app switch.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | STRING | — | |
| metadata_type | COMBO | 6 options: Subject, Description, Create Date, Modify Date, Custom, ALL | |
| custom_metadata | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |