https://github.com/ComfyUI-JH/ComfyUI-JH-XMP-Metadata-Nodes
Custom nodes for ComfyUI for reading and writing XMP metadata
https://github.com/ComfyUI-JH/ComfyUI-JH-XMP-Metadata-Nodes
comfyui comfyui-nodes generative-ai
Last synced: 6 months ago
JSON representation
Custom nodes for ComfyUI for reading and writing XMP metadata
- Host: GitHub
- URL: https://github.com/ComfyUI-JH/ComfyUI-JH-XMP-Metadata-Nodes
- Owner: ComfyUI-JH
- License: gpl-3.0
- Created: 2024-12-09T19:40:12.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-28T20:30:15.000Z (6 months ago)
- Last Synced: 2024-12-28T21:23:11.305Z (6 months ago)
- Topics: comfyui, comfyui-nodes, generative-ai
- Language: Python
- Homepage:
- Size: 386 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-comfyui - **JH XMP Metadata Nodes**
README
![]()
![]()
![]()
![]()
![]()
![]()
---
[**Getting Started**](#getting-started) | [**Nodes**](#nodes) | [**Credits**](#credits)
---# JH XMP Metadata Nodes
Custom nodes for loading and saving images with embedded XMP metadata (https://www.adobe.com/products/xmp.html).
When I generate tens or hundreds of images from ComfyUI they all go into a folder and get forgotten because I have no practical way to find them again. Embedded metadata solves this problem. When metadata is present in a file, both macOS and Windows index it automatically, making it searchable from the Finder on the Mac or the File Explorer in Windows.
![]()
![]()
![]()
![]()
Apps like Photoshop and Lightroom expose XMP metadata and allow it to be viewed or edited.
![]()
![]()
## Supported Properties
The following metadata properties are currently supported:
| Property | Description |
| --- | --- |
| dc:creator | A creator or list of creators of the image. Items can be separated by commas (`John Doe, Jane Doe`) or semicolons (`John Doe; Jane Doe`) |
| dc:rights | Information about the rights and clearances associated with the image, if any. |
| dc:title | A title for the image. |
| dc:description | A description of the image. |
| dc:subject | A subject or list of subjects. Items can be separated by commas (`wetsuit, sunset`) or semicolons (`wetsuit; sunset`) |
| photoshop:Instructions | Special instructions. |
| exif:UserComment | Any user-provided comment about the image. |
| Iptc4xmpCore:AltTextAccessibility | Alt. text that can (in principle) be used by assistive technologies. |
| Iptc4xmpCore:ExtDescrAccessibility | A longer, more detailed elaboration of the Iptc4xmpCore:AltTextAccessibility property |# Getting Started
## Installing from GitHub
1. Install [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
2. Clone this repository into the `custom_nodes` folder:
```
cd ComfyUI/custom_nodes
git clone https://github.com/ComfyUI-JH/ComfyUI_JH_XMP_Metadata_Nodes.git
```3. Install the required Python packages. If you're using `venv` and `pip` that looks like this:
```
cd ComfyUI_JH_Misc_Nodes
pip install -r requirements.txt
```If you're using [Poetry](https://python-poetry.org/), then it's just
```
cd ComfyUI_JH_Misc_Nodes
poetry install
```# Nodes
## Load Image With XMP Metadata
![]()
Just like the built-in **Load Image** node except if XMP metadata is embedded in the image it will be parsed and made available on the node's outputs. The **xml_string** output carries the entire XML data structure including metadata which is not specifically supported by this package.
## Save Image With XMP Metadata
![]()
Saves any images piped into it with embedded XMP metadata. All inputs (except **images**) are optional. Can save in a variety of file formats: JPEG, PNG (with and without embedding the ComfyUI workflow), WebP (lossy and lossless).
## Get Widget Value
![]()
Can be used to get the **string**, **int** or **float** value of any widget on any node. Simply pipe the node into this node's input and type in the name of the widget you want the value of.
## Path to Stem
![]()
Given a path string (absolute or relative), this node returns the "stem," meaning the filename alone minus any extension.
## Format Metadata
![]()
This utility node takes common workflow inputs (prompt, model_name, seed, etc.) and allows you to construct a string that can subsequently be piped into a **Save Image With XMP Metadata** node input to embed metadata however you choose.
# Credits
This software includes source code from other products:
| Product | Code Used | License |
| --- | --- | --- |
| [ComfyUI](https://github.com/comfyanonymous/ComfyUI) | Code from the **Load Image** and **Save Image** nodes. |  |
| [ComfyUI-Custom-Scripts](https://github.com/pythongosssss/ComfyUI-Custom-Scripts) | The **AnyType** class and its implementation. |  |