sort hypernetworks and checkpoints by name

This commit is contained in:
AUTOMATIC
2023-03-28 20:03:57 +03:00
parent 8c69bd08c5
commit 1b63afbedc
2 changed files with 2 additions and 2 deletions

View File

@@ -312,7 +312,7 @@ class Hypernetwork:
def list_hypernetworks(path):
res = {}
for filename in sorted(glob.iglob(os.path.join(path, '**/*.pt'), recursive=True)):
for filename in sorted(glob.iglob(os.path.join(path, '**/*.pt'), recursive=True), key=str.lower):
name = os.path.splitext(os.path.basename(filename))[0]
# Prevent a hypothetical "None.pt" from being listed.
if name != "None":