Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possebility to show Metadata from PNG files #537

Open
baalspawn opened this issue Aug 16, 2024 · 1 comment
Open

Possebility to show Metadata from PNG files #537

baalspawn opened this issue Aug 16, 2024 · 1 comment

Comments

@baalspawn
Copy link

Hi, I was wondering if there is a possebility to add an option to read the metadata for PNG files.
This would be very nice especially for those who make Stable Diffusion images.

Both A1111 and ComfyUI store a lot of data in the Chunk section of the Metadata.
Here you can retrieve prompt, model and settings used to generate the image.

So the "simple" version would be to just be able to show the meta data same way the png file inspector does.
A pretty version would be more difficult due to the different ways the stable diffusions programs store their info.

Example of a simple workflow in ComfyUI:
image

My current workflow when I forget how the image was made (and unable to use the workflow) is using an online PNG inspector
ref: https://www.nayuki.io/page/png-file-chunk-inspector

For A1111 the following chunks are of interest:
iTXt or tEXt
(ref: https://www.w3.org/TR/2003/REC-PNG-20031110/#11iTXt)

For ComfyUI it is nice to have the following data:
tEXt
(ref: https://www.w3.org/TR/2003/REC-PNG-20031110/#11tEXt)

Not sure if the IHDR chunk is needed since Damselfly already knows the image properties.
(ref: https://www.w3.org/TR/2003/REC-PNG-20031110/#11IHDR)

Eks of the chunk data:

Example from a ComfyUI with workflow attatched:
SDFX_00001_
image
image
image
The image is longer, had to cut it short ;)

Example from a Stable Diffusion Webui Forge:

Made with Stable Diffusion WebUI Forge
00000-1527653760
image

@Webreaper
Copy link
Owner

Thanks, I'll take a look. I use MetadataExtractor so shouldn't have to worry about the binary data etc.

What would be useful is if you could run ExifTool over the sample images and from the output, give me the names and values of the fields you're particularly interested in. I can then look at what they're mapped to and add the code to extract them. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants