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
renzhc
diffusers_dcu
Commits
1fff5277
Unverified
Commit
1fff5277
authored
Dec 27, 2023
by
apolinário
Committed by
GitHub
Dec 27, 2023
Browse files
Fix keys for lora format on advanced training scripts (#6361)
fix keys for lora format on advanced training scripts
parent
645a62bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py
...diffusion_training/train_dreambooth_lora_sdxl_advanced.py
+1
-1
No files found.
examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py
View file @
1fff5277
...
@@ -1955,7 +1955,7 @@ def main(args):
...
@@ -1955,7 +1955,7 @@ def main(args):
if
accelerator
.
is_main_process
:
if
accelerator
.
is_main_process
:
unet
=
accelerator
.
unwrap_model
(
unet
)
unet
=
accelerator
.
unwrap_model
(
unet
)
unet
=
unet
.
to
(
torch
.
float32
)
unet
=
unet
.
to
(
torch
.
float32
)
unet_lora_layers
=
get_peft_model_state_dict
(
unet
)
unet_lora_layers
=
convert_state_dict_to_diffusers
(
get_peft_model_state_dict
(
unet
)
)
if
args
.
train_text_encoder
:
if
args
.
train_text_encoder
:
text_encoder_one
=
accelerator
.
unwrap_model
(
text_encoder_one
)
text_encoder_one
=
accelerator
.
unwrap_model
(
text_encoder_one
)
...
...
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