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
23a2cd33
Unverified
Commit
23a2cd33
authored
Jun 18, 2024
by
Sayak Paul
Committed by
GitHub
Jun 18, 2024
Browse files
[LoRA] training fix the position of param casting when loading them (#8460)
fix the position of param casting when loading them
parent
4edde134
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
examples/dreambooth/train_dreambooth_lora_sdxl.py
examples/dreambooth/train_dreambooth_lora_sdxl.py
+2
-2
examples/research_projects/scheduled_huber_loss_training/dreambooth/train_dreambooth_lora_sdxl.py
...er_loss_training/dreambooth/train_dreambooth_lora_sdxl.py
+2
-2
No files found.
examples/dreambooth/train_dreambooth_lora_sdxl.py
View file @
23a2cd33
...
...
@@ -1289,8 +1289,8 @@ def main(args):
models
=
[
unet_
]
if
args
.
train_text_encoder
:
models
.
extend
([
text_encoder_one_
,
text_encoder_two_
])
# only upcast trainable parameters (LoRA) into fp32
cast_training_params
(
models
)
# only upcast trainable parameters (LoRA) into fp32
cast_training_params
(
models
)
accelerator
.
register_save_state_pre_hook
(
save_model_hook
)
accelerator
.
register_load_state_pre_hook
(
load_model_hook
)
...
...
examples/research_projects/scheduled_huber_loss_training/dreambooth/train_dreambooth_lora_sdxl.py
View file @
23a2cd33
...
...
@@ -1363,8 +1363,8 @@ def main(args):
models
=
[
unet_
]
if
args
.
train_text_encoder
:
models
.
extend
([
text_encoder_one_
,
text_encoder_two_
])
# only upcast trainable parameters (LoRA) into fp32
cast_training_params
(
models
)
# only upcast trainable parameters (LoRA) into fp32
cast_training_params
(
models
)
accelerator
.
register_save_state_pre_hook
(
save_model_hook
)
accelerator
.
register_load_state_pre_hook
(
load_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