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
ColossalAI
Commits
1c1f71cb
Commit
1c1f71cb
authored
Jun 06, 2023
by
Maruyama_Aya
Browse files
fixing insecure hash function
parent
b56c7f42
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/tutorial/new_api/dreambooth/train_dreambooth_colossalai.py
...utorial/new_api/dreambooth/train_dreambooth_colossalai.py
+1
-1
No files found.
examples/tutorial/new_api/dreambooth/train_dreambooth_colossalai.py
View file @
1c1f71cb
...
@@ -397,7 +397,7 @@ def main(args):
...
@@ -397,7 +397,7 @@ def main(args):
images
=
pipeline
(
example
[
"prompt"
]).
images
images
=
pipeline
(
example
[
"prompt"
]).
images
for
i
,
image
in
enumerate
(
images
):
for
i
,
image
in
enumerate
(
images
):
hash_image
=
hashlib
.
sha
1
(
image
.
tobytes
()).
hexdigest
()
hash_image
=
hashlib
.
sha
256
(
image
.
tobytes
()).
hexdigest
()
image_filename
=
class_images_dir
/
f
"
{
example
[
'index'
][
i
]
+
cur_class_images
}
-
{
hash_image
}
.jpg"
image_filename
=
class_images_dir
/
f
"
{
example
[
'index'
][
i
]
+
cur_class_images
}
-
{
hash_image
}
.jpg"
image
.
save
(
image_filename
)
image
.
save
(
image_filename
)
...
...
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