use natural sort for shared.walk_files and shared.listfiles, as well as for dirs in extra networks

This commit is contained in:
AUTOMATIC1111
2023-07-08 16:45:59 +03:00
parent 7a6abc59ea
commit d7d6e8cfc8
3 changed files with 14 additions and 6 deletions

View File

@@ -443,7 +443,7 @@ def list_available_loras():
os.makedirs(shared.cmd_opts.lora_dir, exist_ok=True)
candidates = list(shared.walk_files(shared.cmd_opts.lora_dir, allowed_extensions=[".pt", ".ckpt", ".safetensors"]))
for filename in sorted(candidates, key=str.lower):
for filename in candidates:
if os.path.isdir(filename):
continue