Skip to content

Image Lab: Display Png metadata#528

Merged
hlky merged 2 commits into
Sygil-Dev:masterfrom
cobryan05:features/pngNfo
Sep 3, 2022
Merged

Image Lab: Display Png metadata#528
hlky merged 2 commits into
Sygil-Dev:masterfrom
cobryan05:features/pngNfo

Conversation

@cobryan05
Copy link
Copy Markdown
Contributor

This adds a text box to Image Lab that displays the metadata
of any PNG files dropped on it. Can be used to read the info
saved with --save-metadata

image

This adds a text box to Image Lab that displays the metadata
of any PNG files dropped on it. Can be used to read the info
saved with --save-metadata
@codedealer
Copy link
Copy Markdown
Collaborator

That's good. The first step to restoring gradio's state from this metadata.

@devilismyfriend
Copy link
Copy Markdown
Contributor

Thanks for extending the lab :)
I wanted to use the metadata option in order to automatically fill in the gobig settings, and I still do, but the problem is that metadata saving isn't default which means probably not a lot of pictures have it.

I did add a send to lab button and it will copy the paramters of the current generation to the lab as well, might have to try and parse settings from the file/folder naming as well as metadata, we'll see.

@cobryan05
Copy link
Copy Markdown
Contributor Author

I did add a send to lab button and it will copy the paramters of the current generation to the lab as well, might have to try and parse settings from the file/folder naming as well as metadata, we'll see.

I think that trying to parse file/folder naming isn't going to work well, especially with file name limits...

I could see users being unhappy if their images unknowingly had the metadata added to them, but maybe moving the option from the CLI to the UI would make it more 'discoverable' and could even be defaulted 'on'.

I tried making this pull request for gradio: gradio-app/gradio#2170 I think it'd make things a lot easier for you if it goes in. You could unconditionally store metadata in the PNG, so it is available as you pass the image around the UI, and then instead of adding the metadata (if requested) on save, you could strip the metadata (if unwanted) on save.

@codedealer
Copy link
Copy Markdown
Collaborator

codedealer commented Sep 2, 2022

I could see users being unhappy if their images unknowingly had the metadata added to them

I don't think it's a concern when using a software that does image manipulation. Are users unhappy when their camera adds metadata to their photos?

The original Stable Diffusion watermarks images. I also think metadata should be there by default simply for usability's sake when the feature of restoring the state from image is implemented — nothing's lost when metadata is there.

And there should be a toggle to opt out in the UI of course, the one that clearly telegraphs that without the metadata in the images you won't be able to restore the app state and your progress automatically.

@cobryan05
Copy link
Copy Markdown
Contributor Author

I don't think it's a concern when using a software that does image manipulation. Are users unhappy when their camera adds metadata to their photos?

They would probably be unhappy to learn that they just publicly shared a photo in which they didn't realize their camera had added location data to the metadata. I've seen some publicly shared AI generated images in which the file name shows a prompt that I would be ashamed to admit having typed 😆.

I think the benefits of it defaulting on would outweigh the negatives. It'd be pretty sweet to drop an image into the UI and be able to immediately reproduce it. But I think the user should be aware of what information they may be sharing when they upload their PNG. I think a simple UI option of "Embed prompt parameters in output image" would suffice.

@hlky hlky merged commit 6a1a97e into Sygil-Dev:master Sep 3, 2022
jjisnow pushed a commit to jjisnow/stable-diffusion-webui that referenced this pull request Sep 3, 2022
This adds a text box to Image Lab that displays the metadata
of any PNG files dropped on it. Can be used to read the info
saved with --save-metadata

Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>
@cobryan05 cobryan05 deleted the features/pngNfo branch September 29, 2022 03:19
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

Successfully merging this pull request may close these issues.

4 participants