Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AI-Casanova committed Nov 30, 2023
1 parent 9fcdca5 commit 7e89405
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdxl_train_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e89405

Please sign in to comment.