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 image generattion parameters to jpeg exif metadata #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tijszwinkels
Copy link
Contributor

Following a discussion here: https://discord.com/channels/781145214752129095/1081743238194536458/1139584345628213400

It'd be nice to store the image parameters in exported images.
This MR implements this for the jpeg file format. WebP support takes a bit more work, as this is not implemented in the piexifjs library yet. (but I might work on that at a later date).

@sonarcloud
Copy link

sonarcloud bot commented Aug 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tijszwinkels
Copy link
Contributor Author

$ exiftool  -usercomment -software ~/Downloads/0-2830501020-A\ capuccino,\ masterpiece,\ best\ quality,\ epic\ lighting,\ cinematic\ composition,\ arcane\ style,\ hyperrealistic\ \#\#\#\ text.jpg
User Comment                    : A capuccino, masterpiece, best quality, epic lighting, cinematic composition, arcane style, hyperrealistic.Negative prompt: text, b&w, weird colors, cartoon, 3d, bad art, poorly drawn, close up, blurry, disfigured, deformed, extra limbs, candle, watermark, hands.Steps: 50, Sampler: k_dpmpp_2s_a, CFG scale: 5, Seed: 2830501020,Size: 768x512, model: stable_diffusion
Software                        : Stable UI - Create images with Stable Diffusion using the AI Horde

Please note; I put a newline after the user-prompt, to be (mostly) compatible with the A1111 metadata string. It's just that exiftool replaces these with a '.' in the default view, but the original can be recovered with: exiftool -b -usercomment

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.

1 participant