From 5acae38f9b995fbaeb42a1504cce88bd18154f12 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 31 Mar 2023 14:54:15 +0200 Subject: Fix --- train_dreambooth.py | 4 ++-- train_lora.py | 4 ++-- train_ti.py | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/train_dreambooth.py b/train_dreambooth.py index d2e60ec..0634376 100644 --- a/train_dreambooth.py +++ b/train_dreambooth.py @@ -593,7 +593,6 @@ def main(): dropout=args.tag_dropout, shuffle=not args.no_tag_shuffle, template_key=args.train_data_template, - placeholder_tokens=args.placeholder_tokens, valid_set_size=args.valid_set_size, train_set_pad=args.train_set_pad, valid_set_pad=args.valid_set_pad, @@ -604,9 +603,10 @@ def main(): datamodule.setup() num_train_epochs = args.num_train_epochs + sample_frequency = args.sample_frequency if num_train_epochs is None: num_train_epochs = math.ceil(args.num_train_steps / len(datamodule.train_dataset)) - sample_frequency = math.ceil(num_train_epochs * (args.sample_frequency / args.num_train_steps)) + sample_frequency = math.ceil(num_train_epochs * (sample_frequency / args.num_train_steps)) params_to_optimize = (unet.parameters(), ) if args.train_text_encoder_epochs != 0: diff --git a/train_lora.py b/train_lora.py index 7b54ef8..d89b18d 100644 --- a/train_lora.py +++ b/train_lora.py @@ -625,7 +625,6 @@ def main(): dropout=args.tag_dropout, shuffle=not args.no_tag_shuffle, template_key=args.train_data_template, - placeholder_tokens=args.placeholder_tokens, valid_set_size=args.valid_set_size, train_set_pad=args.train_set_pad, valid_set_pad=args.valid_set_pad, @@ -636,9 +635,10 @@ def main(): datamodule.setup() num_train_epochs = args.num_train_epochs + sample_frequency = args.sample_frequency if num_train_epochs is None: num_train_epochs = math.ceil(args.num_train_steps / len(datamodule.train_dataset)) - sample_frequency = math.ceil(num_train_epochs * (args.sample_frequency / args.num_train_steps)) + sample_frequency = math.ceil(num_train_epochs * (sample_frequency / args.num_train_steps)) optimizer = create_optimizer( itertools.chain( diff --git a/train_ti.py b/train_ti.py index 7900fbd..b182a72 100644 --- a/train_ti.py +++ b/train_ti.py @@ -766,9 +766,10 @@ def main(): datamodule.setup() num_train_epochs = args.num_train_epochs + sample_frequency = args.sample_frequency if num_train_epochs is None: num_train_epochs = math.ceil(args.num_train_steps / len(datamodule.train_dataset)) - sample_frequency = math.ceil(num_train_epochs * (args.sample_frequency / args.num_train_steps)) + sample_frequency = math.ceil(num_train_epochs * (sample_frequency / args.num_train_steps)) optimizer = create_optimizer( text_encoder.text_model.embeddings.temp_token_embedding.parameters(), -- cgit v1.2.3-70-g09d2