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
OpenDAS
diffusers
Commits
41833109
Unverified
Commit
41833109
authored
Jan 24, 2023
by
Yuta Hayashibe
Committed by
GitHub
Jan 24, 2023
Browse files
Run inference on a specific condition and fix call of manual_seed() (#2074)
parent
fc8afa3a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
examples/dreambooth/train_dreambooth_lora.py
examples/dreambooth/train_dreambooth_lora.py
+4
-3
No files found.
examples/dreambooth/train_dreambooth_lora.py
View file @
41833109
...
...
@@ -972,7 +972,8 @@ def main(args):
pipeline
.
unet
.
load_attn_procs
(
args
.
output_dir
)
# run inference
generator
=
torch
.
Generator
(
device
=
accelerator
.
device
).
manual_seed
(
args
.
seed
)
if
args
.
validation_prompt
and
args
.
num_validation_images
>
0
:
generator
=
torch
.
Generator
(
device
=
accelerator
.
device
).
manual_seed
(
args
.
seed
)
if
args
.
seed
else
None
prompt
=
args
.
num_validation_images
*
[
args
.
validation_prompt
]
images
=
pipeline
(
prompt
,
num_inference_steps
=
25
,
generator
=
generator
).
images
...
...
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