diff options
author | Isaac Poulton <flagredomega@gmail.com> | 2022-11-04 13:53:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 13:53:11 +0000 |
commit | 08feb4c364e8b2aed929fd7d22dfa21a93d78b2c (patch) | |
tree | 09905d46752b94319fc4d74e8d999f6ad3fcaedc /modules/hypernetworks | |
parent | fd62727893f9face287b0a9620251afaa38a627d (diff) | |
download | stable-diffusion-webui-gfx803-08feb4c364e8b2aed929fd7d22dfa21a93d78b2c.tar.gz stable-diffusion-webui-gfx803-08feb4c364e8b2aed929fd7d22dfa21a93d78b2c.tar.bz2 stable-diffusion-webui-gfx803-08feb4c364e8b2aed929fd7d22dfa21a93d78b2c.zip |
Sort straight out of the glob
Diffstat (limited to 'modules/hypernetworks')
-rw-r--r-- | modules/hypernetworks/hypernetwork.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py index f1f04a70..a441ab10 100644 --- a/modules/hypernetworks/hypernetwork.py +++ b/modules/hypernetworks/hypernetwork.py @@ -219,12 +219,12 @@ class Hypernetwork: def list_hypernetworks(path):
res = {}
- for filename in glob.iglob(os.path.join(path, '**/*.pt'), recursive=True):
+ for filename in sorted(glob.iglob(os.path.join(path, '**/*.pt'), recursive=True)):
name = os.path.splitext(os.path.basename(filename))[0]
# Prevent a hypothetical "None.pt" from being listed.
if name != "None":
res[name] = filename
- return dict(sorted(res.items()))
+ return res
def load_hypernetwork(filename):
|