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
2d753b6f
Unverified
Commit
2d753b6f
authored
Aug 07, 2024
by
Sayak Paul
Committed by
GitHub
Aug 07, 2024
Browse files
fix train_dreambooth_lora_sd3.py loading hook (#9107)
parent
39e1f7ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/dreambooth/train_dreambooth_lora_sd3.py
examples/dreambooth/train_dreambooth_lora_sd3.py
+1
-1
No files found.
examples/dreambooth/train_dreambooth_lora_sd3.py
View file @
2d753b6f
...
...
@@ -1271,7 +1271,7 @@ def main(args):
lora_state_dict
=
StableDiffusion3Pipeline
.
lora_state_dict
(
input_dir
)
transformer_state_dict
=
{
f
'
{
k
.
replace
(
"transformer."
,
""
)
}
'
:
v
for
k
,
v
in
lora_state_dict
.
items
()
if
k
.
startswith
(
"
unet
."
)
f
'
{
k
.
replace
(
"transformer."
,
""
)
}
'
:
v
for
k
,
v
in
lora_state_dict
.
items
()
if
k
.
startswith
(
"
transformer
."
)
}
transformer_state_dict
=
convert_unet_state_dict_to_peft
(
transformer_state_dict
)
incompatible_keys
=
set_peft_model_state_dict
(
transformer_
,
transformer_state_dict
,
adapter_name
=
"default"
)
...
...
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