diff --git a/modules/training.py b/modules/training.py index 84e6840..3de85a5 100644 --- a/modules/training.py +++ b/modules/training.py @@ -262,7 +262,7 @@ def do_train(lora_name: str, always_override: bool, save_steps: int, micro_batch else: ind = prompt.index(train_only_after) + len(train_only_after) - before_tokens = encode(prompt[:ind], False) + before_tokens = encode(prompt[:ind], True) after_tokens = encode(prompt[ind:], False) full_length = len(after_tokens) + len(before_tokens)