Image Lab: Display Png metadata#528
Conversation
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
|
That's good. The first step to restoring gradio's state from this metadata. |
|
Thanks for extending the lab :) 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. |
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. |
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. |
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>
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