mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-19 21:00:14 +08:00
Merge pull request #14890 from AUTOMATIC1111/always-append-timestamp
Always add timestamp to displayed image
This commit is contained in:
commit
440fff64a2
@ -35,12 +35,7 @@ def save_pil_to_file(self, pil_image, dir=None, format="png"):
|
|||||||
already_saved_as = getattr(pil_image, 'already_saved_as', None)
|
already_saved_as = getattr(pil_image, 'already_saved_as', None)
|
||||||
if already_saved_as and os.path.isfile(already_saved_as):
|
if already_saved_as and os.path.isfile(already_saved_as):
|
||||||
register_tmp_file(shared.demo, already_saved_as)
|
register_tmp_file(shared.demo, already_saved_as)
|
||||||
filename = already_saved_as
|
return f'{already_saved_as}?{os.path.getmtime(already_saved_as)}'
|
||||||
|
|
||||||
if not shared.opts.save_images_add_number:
|
|
||||||
filename += f'?{os.path.getmtime(already_saved_as)}'
|
|
||||||
|
|
||||||
return filename
|
|
||||||
|
|
||||||
if shared.opts.temp_dir != "":
|
if shared.opts.temp_dir != "":
|
||||||
dir = shared.opts.temp_dir
|
dir = shared.opts.temp_dir
|
||||||
|
Loading…
Reference in New Issue
Block a user