From 80e1b262e57c5dc78b496184be79026a2ad503b8 Mon Sep 17 00:00:00 2001 From: orenwang <371248882@qq.com> Date: Tue, 31 Jan 2023 10:59:46 +0800 Subject: [PATCH] fix validation_steps handling in dreambooth example --- examples/lora_dreambooth/train_dreambooth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lora_dreambooth/train_dreambooth.py b/examples/lora_dreambooth/train_dreambooth.py index 6794b91..3f1e0cb 100644 --- a/examples/lora_dreambooth/train_dreambooth.py +++ b/examples/lora_dreambooth/train_dreambooth.py @@ -978,7 +978,7 @@ def main(args): if ( args.validation_prompt is not None - and step + num_update_steps_per_epoch * epoch % args.validation_steps == 0 + and (step + num_update_steps_per_epoch * epoch) % args.validation_steps == 0 ): logger.info( f"Running validation... \n Generating {args.num_validation_images} images with prompt:"