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

[Bug]: Image previews link to temporary image directory/filename even when autosave is enabled

Open quicks1lver42 opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

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

What happened?

As per title, after rendering an image, the preview on the right links to its temp folder location rather than the one in the output folder. I am aware that this used to be the case when "Always save all generated images" was unchecked in the settings, but now it seems to happen regardless.

It's not a huge deal, but it does break the filenames in the lazy workflow I was using of copypasting or dragging/dropping outputs directly from the UI.

Steps to reproduce the problem

  1. Go to any generation tab
  2. Generate an image
  3. Right-click the generated image and 'open image in new tab'.
  4. Check the filepath/filename in the address bar

What should have happened?

When "Always save all generated images" is enabled in the settings, the filepath/filename used by previews of generated images should be that of the outputs/[type]/[date]/[number]-[seed].[extension] rather than the temp path.

Commit where the problem happens

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/20ae71faa8ef035c31aa3a410b707d792c8203a3

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

--opt-sub-quad-attention --opt-channelslast --xformers

List of extensions

https://github.com/KohakuBlueleaf/a1111-sd-webui-locon https://github.com/yfszzx/stable-diffusion-webui-images-browser https://github.com/ilian6806/stable-diffusion-webui-state

Console logs

N/A

Additional information

No response

quicks1lver42 avatar May 27 '23 21:05 quicks1lver42

I also experience the same bug. Hope it gets fixed soon.

c0nfess0r avatar May 27 '23 22:05 c0nfess0r

I see the same problem in Linux.

sean-kang avatar May 28 '23 11:05 sean-kang

is this being fixed? if previews are not being saved to the path defined in config, but windows temp folder instead, this also is a huge security risk. Sometimes nsfw images fail to produce correct images, and this you dont want to have in windows temp folder...

Username69992872 avatar May 30 '23 22:05 Username69992872

This has been quite annoying. I've resorted to using Nomacs on the output directory for viewing results instead.

Kadah avatar May 31 '23 09:05 Kadah

Running into the same issue here as well. This breaks a couple of my extensions so I will need to downgrade to a previous version.

gshawn3 avatar May 31 '23 11:05 gshawn3

Makes using it remotely with --listen on a 2nd pc very scuffed as you cannot rightclick download the images with the proper name.

Flixerine avatar May 31 '23 22:05 Flixerine

I believe this is related to a bug in gradio v3.31.0. Editing requirements.txt and requirements_versions.txt to change the gradio version to v3.33.1 has solved this issue for me, along with A1111 ignoring a custom temp directory and saving in C:\Users\[username]\AppData\Local\Temp\. I would raise a PR but I'm not sure if any other considerations are necessary before bumping the gradio version. I haven't noticed any issues yet.

VV828 avatar Jun 02 '23 05:06 VV828

I believe this is related to a bug in gradio v3.31.0. Editing requirements.txt and requirements_versions.txt to change the gradio version to v3.33.1 has solved this issue for me, along with A1111 ignoring a custom temp directory and saving in C:\Users\[username]\AppData\Local\Temp\. I would raise a PR but I'm not sure if any other considerations are necessary before bumping the gradio version. I haven't noticed any issues yet.

This worked for me too, thanks so much for showing it :)

reicou avatar Jun 03 '23 15:06 reicou

This issue has been fixed in the latest v1.3.2.

sean-kang avatar Jun 05 '23 07:06 sean-kang