AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
135.05k stars 25.8k forks source link

[Feature Request]: Switch to XMP image metadata instead of current PNG info #8407

Open ghost opened 1 year ago

ghost commented 1 year ago

Is there an existing issue for this?

What would your feature do ?

It's common for images created with SD to be edited in an editor like Photoshop or GIMP, but altering the image will destroy the png info that is so helpful for remembering prompts and parameters. Can this info survive general editing if it's migrated to the XMP metadata standard?

Proposed workflow

It would be most excellent to have a dropdown that would essentially fill these fields:

image

Description could contain the data blob that is normally put as a tag for png info.

Another thing to consider is the current format is some arbitrary tag and is not well supported by other sites and programs that analyze metadata. 95% of the offerings out there for image data won't allow you to edit, extract, or even see this data.

Additional information

No response

ClashSAN commented 1 year ago

Is there already an option for it ? I can't remember. .jpg has exif comment, maybe you can use that. image

FredHappyface commented 8 months ago

Currently EXIF is used for this. However, a bunch of applications like discord (often used for sharing images on AI communities etc) strip EXIF. However AFAIK it does not strip XMP metadata. The python lib pyexiv2 can be used to add this to a wide range of images. I'd be happy to submit a pr if this is of interest