mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-15 08:36:41 +00:00
Update train_network.py
This commit is contained in:
@@ -1086,7 +1086,7 @@ class NetworkTrainer:
|
||||
if args.save_state:
|
||||
train_util.save_and_remove_state_on_epoch_end(args, accelerator, epoch + 1)
|
||||
|
||||
if args.sample_every_n_epochs is not None and (epoch + 1)% args.sample_every_n_epochs != 0:
|
||||
if args.sample_every_n_epochs is not None and (epoch + 1)% args.sample_every_n_epochs == 0:
|
||||
example_tuple = (latents, batch["captions"])
|
||||
self.sample_images(accelerator, args, epoch + 1, global_step, accelerator.device, vae, tokenizer, text_encoder, unet, example_tuple)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user