stable-ui icon indicating copy to clipboard operation
stable-ui copied to clipboard

Add image generattion parameters to jpeg exif metadata

Open tijszwinkels opened this issue 1 year ago • 2 comments

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).

tijszwinkels avatar Aug 15 '23 13:08 tijszwinkels

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

sonarcloud[bot] avatar Aug 15 '23 13:08 sonarcloud[bot]

$ 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

tijszwinkels avatar Aug 15 '23 14:08 tijszwinkels