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

Add support for reading from PNG Alpha (Stealth PNG) #274

Open
EgorkaSanyok opened this issue Nov 26, 2024 · 0 comments
Open

Add support for reading from PNG Alpha (Stealth PNG) #274

EgorkaSanyok opened this issue Nov 26, 2024 · 0 comments

Comments

@EgorkaSanyok
Copy link

Is your feature request related to a problem? Please describe.
Some websites strip EXIF metadata from images when uploaded, thus losing the prompt. However, a solution to circumvent that was implemented, namely, encoding the prompt info into the PNG alpha channel of a generated photo. This is dubbed "stealth PNG". NovelAI employs this by default, in addition to regular EXIF metadata.

Describe the solution you'd like
Plugins for sd-webui and ComfyUI that encode prompt generation into the PNG alpha channel have been developed, and can be found here:
https://github.com/neggles/sd-webui-stealth-pnginfo
https://github.com/catboxanon/comfyui_stealth_pnginfo
Adding support for this feature would make the Diffusion Toolkit more complete, and wouldn't have to use those web tools in order to see the metadata of such images. It would also be useful to have a way to copy this information back and forth between it and the EXIF metadata tags of the file itself, for better preservation.

Describe alternatives you've considered
Currently, this data can only be read by the plugins mentioned above, the official NovelAI inspect tool (https://novelai.net/inspect) as well as this plugin that only works on 4chan (https://gist.github.com/catboxanon/ca46eb79ce55e3216aecab49d5c7a3fb)

Additional context
Here is an example image, generated with sd-webui and the stealth-pnginfo plugin, having its EXIF data removed.

Without the stealth-pnginfo plugin, the PNG info tab in the web-ui will not display anything. Installing it will then show the proper metadata

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

1 participant