Skip to content

Commit

Permalink
Update: This is a method to display the results of each model during …
Browse files Browse the repository at this point in the history
…training and can be commented out.
  • Loading branch information
chairc committed Sep 22, 2023
1 parent 4b43d32 commit 3443662
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ def train(rank=None, args=None):
sampled_images = diffusion.sample(model=model, n=n, labels=labels, cfg_scale=cfg_scale)
ema_sampled_images = diffusion.sample(model=ema_model, n=n, labels=labels,
cfg_scale=cfg_scale)
plot_images(images=sampled_images)
# This is a method to display the results of each model during training and can be commented out
# plot_images(images=sampled_images)
save_images(images=sampled_images, path=os.path.join(results_vis_dir, f"{save_name}.jpg"))
save_images(images=ema_sampled_images, path=os.path.join(results_vis_dir, f"{save_name}_ema.jpg"))
if save_model_interval and epoch > start_model_interval:
Expand Down

0 comments on commit 3443662

Please sign in to comment.