summaryrefslogtreecommitdiffstats
path: root/train_dreambooth.py
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2023-02-21 11:50:11 +0100
committerVolpeon <git@volpeon.ink>2023-02-21 11:50:11 +0100
commit9d6252e63bac241e5c6191eb47adb51b84a5d782 (patch)
tree6cb649510b48ca33419af3721e630f1c06bf1ae2 /train_dreambooth.py
parentEmbedding normalization: Ignore tensors with grad = 0 (diff)
downloadtextual-inversion-diff-9d6252e63bac241e5c6191eb47adb51b84a5d782.tar.gz
textual-inversion-diff-9d6252e63bac241e5c6191eb47adb51b84a5d782.tar.bz2
textual-inversion-diff-9d6252e63bac241e5c6191eb47adb51b84a5d782.zip
Don't rely on Accelerate for gradient accumulation
Diffstat (limited to 'train_dreambooth.py')
-rw-r--r--train_dreambooth.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_dreambooth.py b/train_dreambooth.py
index 431ff3d..280cf77 100644
--- a/train_dreambooth.py
+++ b/train_dreambooth.py
@@ -439,7 +439,6 @@ def main():
439 accelerator = Accelerator( 439 accelerator = Accelerator(
440 log_with=LoggerType.TENSORBOARD, 440 log_with=LoggerType.TENSORBOARD,
441 logging_dir=f"{output_dir}", 441 logging_dir=f"{output_dir}",
442 gradient_accumulation_steps=args.gradient_accumulation_steps,
443 mixed_precision=args.mixed_precision 442 mixed_precision=args.mixed_precision
444 ) 443 )
445 444
@@ -590,6 +589,7 @@ def main():
590 lr_scheduler=lr_scheduler, 589 lr_scheduler=lr_scheduler,
591 prepare_unet=True, 590 prepare_unet=True,
592 num_train_epochs=args.num_train_epochs, 591 num_train_epochs=args.num_train_epochs,
592 gradient_accumulation_steps=args.gradient_accumulation_steps,
593 sample_frequency=args.sample_frequency, 593 sample_frequency=args.sample_frequency,
594 # -- 594 # --
595 tokenizer=tokenizer, 595 tokenizer=tokenizer,