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
cd9d0913
Unverified
Commit
cd9d0913
authored
Jun 07, 2023
by
Alex McKinney
Committed by
GitHub
Jun 07, 2023
Browse files
Fixes eval generator init in `train_text_to_image_lora.py` (#3678)
parent
fdec2318
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
examples/text_to_image/train_text_to_image_lora.py
examples/text_to_image/train_text_to_image_lora.py
+6
-2
No files found.
examples/text_to_image/train_text_to_image_lora.py
View file @
cd9d0913
...
...
@@ -835,7 +835,9 @@ def main():
pipeline
.
set_progress_bar_config
(
disable
=
True
)
# run inference
generator
=
torch
.
Generator
(
device
=
accelerator
.
device
).
manual_seed
(
args
.
seed
)
generator
=
torch
.
Generator
(
device
=
accelerator
.
device
)
if
args
.
seed
is
not
None
:
generator
=
generator
.
manual_seed
(
args
.
seed
)
images
=
[]
for
_
in
range
(
args
.
num_validation_images
):
images
.
append
(
...
...
@@ -891,7 +893,9 @@ def main():
pipeline
.
unet
.
load_attn_procs
(
args
.
output_dir
)
# run inference
generator
=
torch
.
Generator
(
device
=
accelerator
.
device
).
manual_seed
(
args
.
seed
)
generator
=
torch
.
Generator
(
device
=
accelerator
.
device
)
if
args
.
seed
is
not
None
:
generator
=
generator
.
manual_seed
(
args
.
seed
)
images
=
[]
for
_
in
range
(
args
.
num_validation_images
):
images
.
append
(
pipeline
(
args
.
validation_prompt
,
num_inference_steps
=
30
,
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