Skip to content

Commit

Permalink
Merge pull request #14890 from AUTOMATIC1111/always-append-timestamp
Browse files Browse the repository at this point in the history
Always add timestamp to displayed image
  • Loading branch information
AUTOMATIC1111 authored Feb 11, 2024
2 parents d2246df + c04c4b9 commit 440fff6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions modules/ui_tempdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
if already_saved_as and os.path.isfile(already_saved_as):
register_tmp_file(shared.demo, already_saved_as)
filename = already_saved_as

if not shared.opts.save_images_add_number:
filename += f'?{os.path.getmtime(already_saved_as)}'

return filename
return f'{already_saved_as}?{os.path.getmtime(already_saved_as)}'

if shared.opts.temp_dir != "":
dir = shared.opts.temp_dir
Expand Down

0 comments on commit 440fff6

Please sign in to comment.