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
4367b8a3
"git@developer.sourcefind.cn:OpenDAS/bitsandbytes.git" did not exist on "90b0ac57b0d8d8f996126deb8bba6b7dc75b4327"
Unverified
Commit
4367b8a3
authored
Aug 07, 2023
by
Patrick von Platen
Committed by
GitHub
Aug 07, 2023
Browse files
move pipeline only when running validation (#4515)
parent
f4f85413
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
examples/dreambooth/train_dreambooth_lora_sdxl.py
examples/dreambooth/train_dreambooth_lora_sdxl.py
+1
-2
No files found.
examples/dreambooth/train_dreambooth_lora_sdxl.py
View file @
4367b8a3
...
@@ -1311,14 +1311,13 @@ def main(args):
...
@@ -1311,14 +1311,13 @@ def main(args):
pipeline
.
scheduler
=
DPMSolverMultistepScheduler
.
from_config
(
pipeline
.
scheduler
.
config
,
**
scheduler_args
)
pipeline
.
scheduler
=
DPMSolverMultistepScheduler
.
from_config
(
pipeline
.
scheduler
.
config
,
**
scheduler_args
)
pipeline
=
pipeline
.
to
(
accelerator
.
device
)
# load attention processors
# load attention processors
pipeline
.
load_lora_weights
(
args
.
output_dir
)
pipeline
.
load_lora_weights
(
args
.
output_dir
)
# run inference
# run inference
images
=
[]
images
=
[]
if
args
.
validation_prompt
and
args
.
num_validation_images
>
0
:
if
args
.
validation_prompt
and
args
.
num_validation_images
>
0
:
pipeline
=
pipeline
.
to
(
accelerator
.
device
)
generator
=
torch
.
Generator
(
device
=
accelerator
.
device
).
manual_seed
(
args
.
seed
)
if
args
.
seed
else
None
generator
=
torch
.
Generator
(
device
=
accelerator
.
device
).
manual_seed
(
args
.
seed
)
if
args
.
seed
else
None
images
=
[
images
=
[
pipeline
(
args
.
validation_prompt
,
num_inference_steps
=
25
,
generator
=
generator
).
images
[
0
]
pipeline
(
args
.
validation_prompt
,
num_inference_steps
=
25
,
generator
=
generator
).
images
[
0
]
...
...
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