aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-08 12:09:20 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-05-08 12:09:20 +0000
commit505a10ad928eb11849828c88850ce3e5e3566fe4 (patch)
tree876c0fa4e796949db9f52688e90365af07cb8219
parent879ed5422c85ddcd6b67c0fa865829439c44a4dc (diff)
downloadstable-diffusion-webui-gfx803-505a10ad928eb11849828c88850ce3e5e3566fe4.tar.gz
stable-diffusion-webui-gfx803-505a10ad928eb11849828c88850ce3e5e3566fe4.tar.bz2
stable-diffusion-webui-gfx803-505a10ad928eb11849828c88850ce3e5e3566fe4.zip
use file modification time instead of current time for #9760
-rw-r--r--CHANGELOG.md1
-rw-r--r--modules/ui_tempdir.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1ae81232..c56d3a0e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,7 @@
* make the lightbox fullscreen image function properly
* fix squished thumbnails in extras tab
* keep "search" filter for extra networks when user refreshes the tab (previously it showed everthing after you refreshed)
+ * fix webui showing the same image if you configure the generation to always save results into same file
## 1.1.1
diff --git a/modules/ui_tempdir.py b/modules/ui_tempdir.py
index 42a85d3b..67bfd1ec 100644
--- a/modules/ui_tempdir.py
+++ b/modules/ui_tempdir.py
@@ -35,7 +35,8 @@ def check_tmp_file(gradio, filename):
def save_pil_to_file(pil_image, dir=None):
already_saved_as = getattr(pil_image, 'already_saved_as', None)
if already_saved_as and os.path.isfile(already_saved_as):
- already_saved_as += f'?{int(time())}'
+ already_saved_as += f'?{os.path.getmtime(already_saved_as)}'
+
register_tmp_file(shared.demo, already_saved_as)
file_obj = Savedfile(already_saved_as)