stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: Model / Extra Network Cards list order is not apparent and can't find settings to effect that listing order
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Model / Extra Networks Cards list order is not apparent and can't find settings to effect that listing order
Here it is clearly not alphabetical, which I wish it was as I have 150+ checkpoints (loras, HNs and TIs have same ordering issue).
Is there a solution for this?
Steps to reproduce the problem
Open model assest tabs
What should have happened?
Some order should be used. Alphabetical is expected
Commit where the problem happens
all commits
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
`Launching Web UI with arguments: --administrator --autolaunch --api --xformers --medvram --precision full --no-half --cors-allow-origins=*`
List of extensions
n/a
Console logs
n/a
Additional information
n/a
I tried resetting my file creation and and lastwritesdate to current DateTime That did not effect my listing order either
$CurrentDateTime = Get-Date
Get-ChildItem -Recurse | ForEach-Object {
$_.CreationTime = $CurrentDateTime
$_.LastWriteTime = $CurrentDateTime
}
Anyone have insight to what is used to order the listing of Loras, Checkpoints, Hypernetworks and and textual Inversions in the card view?
That seems weird, as for me everything is sorted.
Looking at the code its all sorted there so I don't really know. https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8/extensions-builtin/Lora/lora.py#L185-L201
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8/modules/hypernetworks/hypernetwork.py#L313-L320 and etc.
If you want to try. clone the repository again and copy some our files there and see if they are sorted in that one. But yeah unfortunately I don't know why this should occur. You can search stuff, so that should help a bit.
For me Loras are sorted (with capitals sorted before lower case) while textural inversions are not.
I think this is the relevant code for generating the list of textural inversions:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8/modules/textual_inversion/textual_inversion.py#L194-L210
which just uses whatever order os.walk
returns. If the sorting happens elsewhere then it's not working for me.
There are definitely multiple issues in terms of reliable sorting with the Extra Networks' panel. As well as the Loras tab, Hypernetworks also sort case-sensitively. Checkpoints and Textual Inversion are case-insensitive. But beyond that, what's returned should be sorted by a clear, unified method. So... Everything said here, basically: Make a setting for choosing how to sort and sort entries by it.
The sorting in all my "Extra networks" tabs is a mess as well:
I'm using folder structures to store Models/Embeds/LoRAs/Etc. And I cant find anything there without using either STRG+F or the implemented search field because of the current sorting order.
Also, once the issue with case sensitivity as stated by OP is fixed, it would be great if we could set the sorting order for directories (buttons) and for the models (cards/thumbs) separately.
After the fix the directories (buttons) sorting order will be by path: ... \016-Styles_Classical_Arts\A \016-Styles_Classical_Arts\b \016-Styles_Classical_Arts\b\A ...
For the sorting order of models (cards) it would be great if we could choose between "by Path+Modelname" or just "by Modelname" sorting order. A Dropdown menu under Extra Networks' settings would be great place to set it.