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
803d6537
Unverified
Commit
803d6537
authored
Jun 07, 2023
by
Patrick von Platen
Committed by
GitHub
Jun 07, 2023
Browse files
Fix custom releases (#3708)
* Fix custom releases * make style
parent
cd9d0913
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/diffusers/utils/dynamic_modules_utils.py
src/diffusers/utils/dynamic_modules_utils.py
+2
-2
No files found.
src/diffusers/utils/dynamic_modules_utils.py
View file @
803d6537
...
@@ -21,12 +21,12 @@ import os
...
@@ -21,12 +21,12 @@ import os
import
re
import
re
import
shutil
import
shutil
import
sys
import
sys
from
distutils.version
import
StrictVersion
from
pathlib
import
Path
from
pathlib
import
Path
from
typing
import
Dict
,
Optional
,
Union
from
typing
import
Dict
,
Optional
,
Union
from
urllib
import
request
from
urllib
import
request
from
huggingface_hub
import
HfFolder
,
cached_download
,
hf_hub_download
,
model_info
from
huggingface_hub
import
HfFolder
,
cached_download
,
hf_hub_download
,
model_info
from
packaging
import
version
from
..
import
__version__
from
..
import
__version__
from
.
import
DIFFUSERS_DYNAMIC_MODULE_NAME
,
HF_MODULES_CACHE
,
logging
from
.
import
DIFFUSERS_DYNAMIC_MODULE_NAME
,
HF_MODULES_CACHE
,
logging
...
@@ -43,7 +43,7 @@ logger = logging.get_logger(__name__) # pylint: disable=invalid-name
...
@@ -43,7 +43,7 @@ logger = logging.get_logger(__name__) # pylint: disable=invalid-name
def
get_diffusers_versions
():
def
get_diffusers_versions
():
url
=
"https://pypi.org/pypi/diffusers/json"
url
=
"https://pypi.org/pypi/diffusers/json"
releases
=
json
.
loads
(
request
.
urlopen
(
url
).
read
())[
"releases"
].
keys
()
releases
=
json
.
loads
(
request
.
urlopen
(
url
).
read
())[
"releases"
].
keys
()
return
sorted
(
releases
,
key
=
Strict
Version
)
return
sorted
(
releases
,
key
=
lambda
x
:
version
.
Version
(
x
)
)
def
init_hf_modules
():
def
init_hf_modules
():
...
...
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