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
4623f095
Unverified
Commit
4623f095
authored
Oct 27, 2022
by
Duong A. Nguyen
Committed by
GitHub
Oct 27, 2022
Browse files
[DreamBooth] Set train mode for text encoder (#1012)
Set train mode for text encoder
parent
abe05822
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
examples/dreambooth/train_dreambooth.py
examples/dreambooth/train_dreambooth.py
+2
-0
No files found.
examples/dreambooth/train_dreambooth.py
View file @
4623f095
...
...
@@ -574,6 +574,8 @@ def main(args):
for
epoch
in
range
(
args
.
num_train_epochs
):
unet
.
train
()
if
args
.
train_text_encoder
:
text_encoder
.
train
()
for
step
,
batch
in
enumerate
(
train_dataloader
):
with
accelerator
.
accumulate
(
unet
):
# Convert images to latent space
...
...
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