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
730e01ec
Unverified
Commit
730e01ec
authored
Apr 25, 2023
by
Yuchen Fan
Committed by
GitHub
Apr 25, 2023
Browse files
Sync cache version check from transformers (#3179)
sync cache version check from transformers
parent
0d196f9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/diffusers/utils/hub_utils.py
src/diffusers/utils/hub_utils.py
+4
-1
No files found.
src/diffusers/utils/hub_utils.py
View file @
730e01ec
...
...
@@ -199,7 +199,10 @@ if not os.path.isfile(cache_version_file):
cache_version
=
0
else
:
with
open
(
cache_version_file
)
as
f
:
cache_version
=
int
(
f
.
read
())
try
:
cache_version
=
int
(
f
.
read
())
except
ValueError
:
cache_version
=
0
if
cache_version
<
1
:
old_cache_is_not_empty
=
os
.
path
.
isdir
(
old_diffusers_cache
)
and
len
(
os
.
listdir
(
old_diffusers_cache
))
>
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