DominikDoom / a1111-sd-webui-tagcomplete

Booru style tag autocompletion for AUTOMATIC1111's Stable Diffusion web UI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Enhancement] Add optional sort key to models.

Symbiomatrix opened this issue · comments

Hello dom, would it be possible to add an optional comma delimited numerical priority value to each model written in the temp files for loras, embeddings, lycos etc, so that the whole shouldSort segment first orders the models by priority instead of lexicographically?

I've written in a small modification to the get_x functions so that they sort model lists by modification date (per setting), plus other priority ratings, but without additional information the order cannot be preserved when the categories are later merged on the js side. I hardly have the wherewithal to write working code in js, so I'd appreciate your thoughts on this.

I'm actually currently working on a similar themed addition, which is recording usage frequency and factoring that into the order. So basically, the stuff you use most often being recommended at the top. Don't know how long it will take me, though.

I started it mainly for normal tags, but expanding it to Loras, embeddings, etc. is also something I want to do after the first iteration is done. Adding other sort keys like you suggested shouldn't be a big deal once such a system is implemented.

Alright, cool. If it helps, I'll PR the python side of the sort selection once I've cleaned up the code a bit.