Skip to content

Commit

Permalink
Small QOL when using the validation_folder_at_end_of_epoch argument, …
Browse files Browse the repository at this point in the history
…we now append the epoch number to the filename so we can identify at what epoch the image was saved.
  • Loading branch information
ZeroCool940711 committed Dec 15, 2023
1 parent 952d778 commit 6c7d258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion muse_maskgit_pytorch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def vae_folder_validation(accelerator, vae, dataset, args=None, checkpoint_name=
now = datetime.now().strftime("%m-%d-%Y_%H-%M-%S")
hash = hashlib.sha1(input_image.tobytes()).hexdigest()

filename = f"{hash}_{now}{'-' + epoch if epoch else ''}-{os.path.basename(checkpoint_name)}.png"
filename = f"{str(hash)}_{str(now)}{'-'}{'E' + str(epoch) if epoch is not None else ''}-{str(os.path.basename(checkpoint_name))}.png"
grid_image.save(f"{output_dir}/{filename}", format="PNG")

if not save_originals:
Expand Down

0 comments on commit 6c7d258

Please sign in to comment.