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
1bd4c9e9
"...text-generation-inference.git" did not exist on "b5087c4f4ece30decb739ab311448e358f6108bb"
Unverified
Commit
1bd4c9e9
authored
Apr 14, 2023
by
YiYi Xu
Committed by
GitHub
Apr 14, 2023
Browse files
remvoe one line as requested by gc team (#3077)
remvoe one line
parent
eb2ef316
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
examples/text_to_image/train_text_to_image_flax.py
examples/text_to_image/train_text_to_image_flax.py
+3
-4
No files found.
examples/text_to_image/train_text_to_image_flax.py
View file @
1bd4c9e9
...
@@ -340,11 +340,10 @@ def main():
...
@@ -340,11 +340,10 @@ def main():
return
examples
return
examples
if
jax
.
process_index
()
==
0
:
if
args
.
max_train_samples
is
not
None
:
if
args
.
max_train_samples
is
not
None
:
dataset
[
"train"
]
=
dataset
[
"train"
].
shuffle
(
seed
=
args
.
seed
).
select
(
range
(
args
.
max_train_samples
))
dataset
[
"train"
]
=
dataset
[
"train"
].
shuffle
(
seed
=
args
.
seed
).
select
(
range
(
args
.
max_train_samples
))
# Set the training transforms
# Set the training transforms
train_dataset
=
dataset
[
"train"
].
with_transform
(
preprocess_train
)
train_dataset
=
dataset
[
"train"
].
with_transform
(
preprocess_train
)
def
collate_fn
(
examples
):
def
collate_fn
(
examples
):
pixel_values
=
torch
.
stack
([
example
[
"pixel_values"
]
for
example
in
examples
])
pixel_values
=
torch
.
stack
([
example
[
"pixel_values"
]
for
example
in
examples
])
...
...
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