Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
d5983a67
Unverified
Commit
d5983a67
authored
Aug 11, 2023
by
Sayak Paul
Committed by
GitHub
Aug 11, 2023
Browse files
[Examples] fix: network_alpha -> network_alphas (#4572)
network_alpha
parent
796c0153
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
examples/text_to_image/train_text_to_image_lora_sdxl.py
examples/text_to_image/train_text_to_image_lora_sdxl.py
+4
-4
No files found.
examples/text_to_image/train_text_to_image_lora_sdxl.py
View file @
d5983a67
...
@@ -722,13 +722,13 @@ def main(args):
...
@@ -722,13 +722,13 @@ def main(args):
else
:
else
:
raise
ValueError
(
f
"unexpected save model:
{
model
.
__class__
}
"
)
raise
ValueError
(
f
"unexpected save model:
{
model
.
__class__
}
"
)
lora_state_dict
,
network_alpha
=
LoraLoaderMixin
.
lora_state_dict
(
input_dir
)
lora_state_dict
,
network_alpha
s
=
LoraLoaderMixin
.
lora_state_dict
(
input_dir
)
LoraLoaderMixin
.
load_lora_into_unet
(
lora_state_dict
,
network_alpha
=
network_alpha
,
unet
=
unet_
)
LoraLoaderMixin
.
load_lora_into_unet
(
lora_state_dict
,
network_alpha
s
=
network_alpha
s
,
unet
=
unet_
)
LoraLoaderMixin
.
load_lora_into_text_encoder
(
LoraLoaderMixin
.
load_lora_into_text_encoder
(
lora_state_dict
,
network_alpha
=
network_alpha
,
text_encoder
=
text_encoder_one_
lora_state_dict
,
network_alpha
s
=
network_alpha
s
,
text_encoder
=
text_encoder_one_
)
)
LoraLoaderMixin
.
load_lora_into_text_encoder
(
LoraLoaderMixin
.
load_lora_into_text_encoder
(
lora_state_dict
,
network_alpha
=
network_alpha
,
text_encoder
=
text_encoder_two_
lora_state_dict
,
network_alpha
s
=
network_alpha
s
,
text_encoder
=
text_encoder_two_
)
)
accelerator
.
register_save_state_pre_hook
(
save_model_hook
)
accelerator
.
register_save_state_pre_hook
(
save_model_hook
)
...
...
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