From 8d1cfd53c80d7ef9c1660e06b352e15b1ff690d7 Mon Sep 17 00:00:00 2001 From: Chengrui Wang <80876977+crywang@users.noreply.github.com> Date: Fri, 21 Apr 2023 14:56:17 +0800 Subject: [PATCH 1/2] Update train_dreambooth_lora.py fix bug --- examples/dreambooth/train_dreambooth_lora.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dreambooth/train_dreambooth_lora.py b/examples/dreambooth/train_dreambooth_lora.py index 1b75402c3550..9a71fd0f8a0d 100644 --- a/examples/dreambooth/train_dreambooth_lora.py +++ b/examples/dreambooth/train_dreambooth_lora.py @@ -743,7 +743,7 @@ def main(args): ) temp_pipeline._modify_text_encoder(text_lora_attn_procs) text_encoder = temp_pipeline.text_encoder - accelerator.register_for_checkpointing(unet_lora_layers) + accelerator.register_for_checkpointing(text_lora_attn_procs) del temp_pipeline if args.scale_lr: From 5a0c9f8c4d80f1402c35cdf4874b4c5d9c587e8b Mon Sep 17 00:00:00 2001 From: Chengrui Wang <80876977+crywang@users.noreply.github.com> Date: Fri, 21 Apr 2023 18:18:32 +0800 Subject: [PATCH 2/2] Update train_dreambooth_lora.py --- examples/dreambooth/train_dreambooth_lora.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dreambooth/train_dreambooth_lora.py b/examples/dreambooth/train_dreambooth_lora.py index 9a71fd0f8a0d..367a3422de33 100644 --- a/examples/dreambooth/train_dreambooth_lora.py +++ b/examples/dreambooth/train_dreambooth_lora.py @@ -743,7 +743,7 @@ def main(args): ) temp_pipeline._modify_text_encoder(text_lora_attn_procs) text_encoder = temp_pipeline.text_encoder - accelerator.register_for_checkpointing(text_lora_attn_procs) + accelerator.register_for_checkpointing(text_encoder_lora_layers) del temp_pipeline if args.scale_lr: