From 669b518cbd2b9e8f5d7852a89627200f87c649d2 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 8 May 2023 08:36:24 +0300 Subject: [PATCH] add mtime to served images in gallery to prevent cache from showing old images --- modules/ui_tempdir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui_tempdir.py b/modules/ui_tempdir.py index 21945235..9cb4954a 100644 --- a/modules/ui_tempdir.py +++ b/modules/ui_tempdir.py @@ -36,7 +36,7 @@ def save_pil_to_file(pil_image, dir=None): if already_saved_as and os.path.isfile(already_saved_as): register_tmp_file(shared.demo, already_saved_as) - file_obj = Savedfile(already_saved_as) + file_obj = Savedfile(f"{already_saved_as}?{os.path.getmtime(already_saved_as)}") return file_obj if shared.opts.temp_dir != "":