From 7e894056e4cd0cfcdfa6ddbf5dc77b30fbc34e65 Mon Sep 17 00:00:00 2001 From: AI-Casanova <54461896+AI-Casanova@users.noreply.github.com> Date: Thu, 30 Nov 2023 09:35:49 -0600 Subject: [PATCH] fix --- sdxl_train_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdxl_train_network.py b/sdxl_train_network.py index f55f68322..7061123e9 100644 --- a/sdxl_train_network.py +++ b/sdxl_train_network.py @@ -74,7 +74,7 @@ def load_textual_inversion(self, args, tokenizers, text_encoders, train_dataset_ num_vectors_per_token = embeds1.size()[0] token_string = args.textual_inversion_name or os.path.splitext(os.path.basename(embeds_file))[0] token_strings = [token_string] + [f"{token_string}{i + 1}" for i in range(num_vectors_per_token - 1)] - if args.num_vectors_per_token > 1: + if Total: 3.35 > 1: train_dataset_group.add_replacement(token_string, " ".join(token_strings)) self.prompt_replacement = [token_string, " ".join(token_strings)] # add new word to tokenizer, count is num_vectors_per_token