Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
15ed53d2
Unverified
Commit
15ed53d2
authored
Feb 03, 2024
by
Younes Belkada
Committed by
GitHub
Feb 03, 2024
Browse files
Fixes LoRA SDXL training script with DDP + PEFT (#6816)
Update train_dreambooth_lora_sdxl.py
parent
9cc59ba0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/dreambooth/train_dreambooth_lora_sdxl.py
examples/dreambooth/train_dreambooth_lora_sdxl.py
+2
-2
No files found.
examples/dreambooth/train_dreambooth_lora_sdxl.py
View file @
15ed53d2
...
...
@@ -1399,8 +1399,8 @@ def main(args):
text_encoder_two
.
train
()
# set top parameter requires_grad = True for gradient checkpointing works
text_encoder_one
.
text_model
.
embeddings
.
requires_grad_
(
True
)
text_encoder_two
.
text_model
.
embeddings
.
requires_grad_
(
True
)
accelerator
.
unwrap_model
(
text_encoder_one
)
.
text_model
.
embeddings
.
requires_grad_
(
True
)
accelerator
.
unwrap_model
(
text_encoder_two
)
.
text_model
.
embeddings
.
requires_grad_
(
True
)
for
step
,
batch
in
enumerate
(
train_dataloader
):
with
accelerator
.
accumulate
(
unet
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment