Saltar al contenido
Node packVerificadoExterno
Abrir fuente

comfyui-too-xmp-metadata

Using ComyUI to write specific XMP metadata on images

Responsable@tetsuoo-onlineUnratedcalidad

Perfil del paquete

Estado
Verificado
Publicador
@tetsuoo-online
Fuente
GitHub

Léeme

Image


Examples | Installation | Tiny node list |

This is the Comfyui version of a personal project I started last year (2024) with GPT/Claude, as a shell/commandline tool to add tags to ANY images on my computer.

These custom nodes for ComfyUI will allow you to READ and WRITE XMP METADATA to images. A sidenote though, this is not designed to handle image generation datas, there's already plenty of nodes for that.

Examples

image

Adding tags to an existing image without modifying it

  1. Use the "Write XMP Metadata (Lossless)" node
  2. Enter the path to your image in input_image_path
  3. Add your tags as comma-separated values in metadata (e.g., "landscape, sunset, ocean")
  4. Run the node
  5. The tagged image will be saved in a "tagged" subfolder in the same directory as the original, unless you specify a custom path

Adding metadata to a generated image

  1. Connect your image generation output to the "Write XMP Metadata" node
  2. Add your metadata in the metadata field
  3. Choose a format mode (Smart format is recommended)
  4. Run the node
  5. The image with metadata will be saved in the output directory

Reading tags from an image

  1. Use the "Read XMP Metadata" node
  2. Enter the path to your image in image
  3. Set metadata_type to "Subject" to extract tags
  4. Run the node
  5. The tags will be returned as a string

Metadata Format

The metadata input can be either:

  1. A simple string with comma-separated values (e.g., "landscape, sunset, ocean")
  2. A JSON object with a "tags" key and other custom fields:
    {
      "tags": ["landscape", "sunset", "ocean"],
      "author": "John Doe",
      "description": "Beautiful sunset at the beach"
    }
    

If you had similar needs to use prompt keywords and other datas from AI generated images to use as search tags, I can't recommend anything but the amazing Diffusion Toolkit it's awesome, TRY IT IT'S GREAT Picasa was nice too with tags, back in the days... a bit limited though. A bit dead too, long ago x) Sad. And Lightroom is... meh. Nah.

Installation

  1. Clone this repository into the custom_nodes folder of your ComfyUI installation:

    git clone https://github.com/tetsuoo-online/comfyui-too-xmp-metadata.git
    
  2. Make sure ExifTool is installed:

    • Download it here
    • rename the EXE (usually called "exiftool(-k).exe") to exifTool.exe then put it to the package root folder.

Requirements

  • ComfyUI
  • ExifTool
  • PIL/Pillow
  • NumPy

Tiny node list

  • Inputs:
    • image: Path to the image file
    • metadata_type: Type of metadata to extract (Subject, Description, Create Date, Modify Date, or Custom)
    • custom_metadata: Custom metadata field

Nodos de este paquete

4 nodos
  • ClearImageMetadata
  • ReadXMPMetadata
  • WriteXMPMetadataLossless
  • WriteXMPMetadataTensor

Fuentes

3 fuentes
GitHubFuenteVersión e1ccb75bfb3156f3300aa699b5c72df1ebb6f5bb
github.com/tetsuoo-online/comfyui-too-xmp-metadata

Verificado 14 oct

Extractos de fuentes

1 extracto

Source context: Repo tetsuoo-online/comfyui-too-xmp-metadata