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

[Bug]: When using the SD Upscale script in img2img, sending then saving image from "extra" tab results in metadata no longer added

Open Manimap opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

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

What happened?

When I resize an image in the extra tab, it used to also save all the parameters of the original image in txt2img or img2img, but when using sd upscale then sending the image to extra, it doesn't save the correct parameters in metadata.

text2img : cat Negative prompt: dog Steps: 25, Sampler: Euler, CFG scale: 12, Seed: 3032082027, Size: 512x512, Model hash: 81761151, Model: 01 - SD_sd-v1-5-pruned-emaonly

extra : Upscale: 2, visibility: 1.0, model:sudo_RealESRGAN2x_3.332.758_G

Steps to reproduce the problem

1- Create any txt2img, example : cat Negative prompt: dog Steps: 41, Sampler: DPM++ 2M Karras, CFG scale: 11, Seed: 3036605462, Size: 512x512, Model hash: 81761151, Model: 01 - SD_sd-v1-5-pruned-emaonly

2- Send to img2img and use the "SD upscale" script. (BTW it has another issue related to saving images out of multiple results, maybe linked : https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2868 )

3- Send the result to extra and generate a whatever final image, in my case x1.1 + SwinIR_4x.

4- Open the result in PNG Info and the metadata should be wrong. In this case I see : extras Upscale: 1.1, visibility: 1.0, model:SwinIR_4x

If I don't use SD Upscale in img2img, I get the following when sending to extra and doing the same : cat Negative prompt: dog Steps: 41, Sampler: Euler a, CFG scale: 9, Seed: 1313307519, Size: 512x512, Model hash: 81761151, Model: 01 - SD_sd-v1-5-pruned-emaonly, Denoising strength: 0, Mask blur: 4 extras Upscale: 1.1, visibility: 1.0, model:SwinIR_4x

What should have happened?

It should save everything and not delete the original txt2img/img2img metadata.

Commit where the problem happens

b08698a09a257365238e43cc9023ce7cf9af73c4

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Brave

Command Line Arguments

No response

Additional information, context and logs

No response

Manimap avatar Nov 05 '22 17:11 Manimap

Cannot replicate with a2a1a2f7. Cannot replicate on "Commit where the problem happens", https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/b08698a09a257365238e43cc9023ce7cf9af73c4, either. Tested both 1) with dropping an image with PNG info into Extras, and 2) with using the Send to Extras button. Also tested with "Scale to" instead of "Scale by." Can't get anything to delete PNG info.

Are you sure "Save text information about generation parameters as chunks to png files" is checked in settings? Are there any command line arguments going on? Anything else nonstandard?

timntorres avatar Nov 06 '22 07:11 timntorres

Thanks for checking it, I can confirm it is now working, tested the same input cat/dog, and got it properly written in metadata this time... I literally didn't change anything since yesterday, so no idea what happened. I'll close the issue.

Manimap avatar Nov 06 '22 07:11 Manimap

Reopening because I could reproduce the problem with the following steps : 1- Create any txt2img, example : cat Negative prompt: dog Steps: 41, Sampler: DPM++ 2M Karras, CFG scale: 11, Seed: 3036605462, Size: 512x512, Model hash: 81761151, Model: 01 - SD_sd-v1-5-pruned-emaonly

2- Send to img2img and use the "SD upscale" script. (BTW it has another issue related to saving images out of multiple results, maybe linked : https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2868 )

3- Send the result to extra and generate a whatever final image, in my case x1.1 + SwinIR_4x.

4- Open the result in PNG Info and the metadata should be wrong. In this case I see : extras Upscale: 1.1, visibility: 1.0, model:SwinIR_4x

If I don't use SD Upscale in img2img, I get the following when sending to extra and doing the same : cat Negative prompt: dog Steps: 41, Sampler: Euler a, CFG scale: 9, Seed: 1313307519, Size: 512x512, Model hash: 81761151, Model: 01 - SD_sd-v1-5-pruned-emaonly, Denoising strength: 0, Mask blur: 4 extras Upscale: 1.1, visibility: 1.0, model:SwinIR_4x

Manimap avatar Nov 06 '22 12:11 Manimap

Closing as stale.

catboxanon avatar Aug 03 '23 16:08 catboxanon