mirror of
https://github.com/wassname/peft.git
synced 2026-09-09 11:28:32 +08:00
Merge pull request #25 from huggingface/smangrul/fixes
Update train_dreambooth.py
This commit is contained in:
@@ -716,8 +716,9 @@ def main(args):
|
||||
|
||||
if args.gradient_checkpointing:
|
||||
unet.enable_gradient_checkpointing()
|
||||
if args.train_text_encoder:
|
||||
text_encoder.gradient_checkpointing_enable()
|
||||
# below fails when using lora so commenting it out
|
||||
# if args.train_text_encoder:
|
||||
# text_encoder.gradient_checkpointing_enable()
|
||||
|
||||
# Enable TF32 for faster training on Ampere GPUs,
|
||||
# cf https://pytorch.org/docs/stable/notes/cuda.html#tensorfloat-32-tf32-on-ampere-devices
|
||||
|
||||
Reference in New Issue
Block a user