stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Feature Request]: include metadata that drastically changes output

Open DmytroSokhach opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

  1. Include additional metadata in output images.
  2. Suggested metadata include: a) torch version b) python version (not sure if it affects seed or something) c) maybe CUDA or NVIDIA driver version if it can affect final result d) other drastic options which developers might know better than anyone 😜
  3. (Optional) would be nice to highlight in #ff0000red on PNGInfo tab "drastic discrepancies", like torch version, or python version, or something else like missing lora:xxxx

Proposed workflow

  1. PNGInfo -> txt2img
  2. Click Generate button
  3. Output should have data necessary to generate image with "visually close enough" accuracy. (I don't know how to determine, just don't want final images to differ completely)
  4. repeating steps 1-3 should give consistent results if taking own images next month, or month after, etc.

Additional information

As for today I can't reproduce images that I've generated 1 month ago even with recreated setup. It took me quite a while to figure out that "torch" library upgrade from 1.13 to 2.0 drastically changes outputs. I've got 2 versions locally at the moment to test it more. As a user it is very confusing, that PNGInfo -> txt2img flow doesn't work for images I had generated earlier. lyriel_15_16_torch_1 13_2 0comparisson

DmytroSokhach avatar May 21 '23 13:05 DmytroSokhach

I found that embeddings and textual inversions can be tricky. For example: when image is generated with certain in it, it is easy to recognize that and console points that certain LORA is missing however when textual inversion was mentioned in the prompt, but not actually used it is later really hard to reproduce image when the embedding is present.

Scenario:

  1. "embeddingA" is not present in system
  2. generate image with prompt and mention "embeddingA"
  3. install "embeddingA" into stable-diffusion-web-ui
  4. drop image to PNG Info -> txt2img -> Generate

DmytroSokhach avatar Jun 09 '23 21:06 DmytroSokhach

Certain VAE also change image. Would be nice to have it explicitly listed in metadata.

DmytroSokhach avatar Jun 09 '23 22:06 DmytroSokhach

Adding to this: would also be nice to know which cross-attention opt. method was used (xformers, doggettx, etc)

nVitius avatar Jun 23 '23 07:06 nVitius

@nVitius funny enough I found my own post exactly searching for "Cross attention optimization" changes in recent releases. Short answer: Doggettx is selected Automatically, I haven't changed this setting manually before. (xformers disabled)

I'm struggling last week to reproduce at least 1 image from Civitai, which was not a problem before. I was not updating A1111 for 1 month, then decided to go forward to v1.5.1 and boom... 🤯😶‍🌫️🤕nothing works as expected anymore

I have multiple backup copies of A1111 to test different versions, and:

  1. I still can reproduce images from old prompts using old version
  2. I struggle whole week to reproduce anything with v1.5.1 and it doesn't work even on clean installation. 😔

I wish it would be possible to find out what is the cause of the difference and a add it to metadata.

DmytroSokhach avatar Aug 06 '23 20:08 DmytroSokhach

I'm going to close this because as mentioned in https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12449#issuecomment-1672941031, this is already being done. Torch version theoretically should not affect output, but version number of the webui is being recorded in the infotext, and with that can be extrapolated which Torch version the webui was using at the time if necessary. Python version will not change results. VAE and all extra networks (TI embeddings, hypernetworks, LoRA, etc) are also added to the metadata as of 1.6.0.

If you can't replicate your own images compared to past versions, and extension updates are also not the cause, feel free to open an issue with more details, including full image metadata. Any seed breaking changes are also documented. For reference, I can re-generate images back from September identically.

Civitai images are notoriously flaky to reproduce, as hardware differences do factor into those, so please only open replication issues for your own images.

catboxanon avatar Aug 25 '23 01:08 catboxanon