Repository: stable-diffusion-webui
Issue: [Feature Request]: Custom Names for LoRAs (Checkpoints, TIs, etc)
Labels: enhancement

### Is there an existing issue for this?

- [x] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

I'd like to propose an option in "Edit Metadata" to allow us to add custom names for the LoRAs (and Checkpoints, TIs, etc) and an option to sort them by Custom Names. Those names should be stored along with all other info inside the .json file that is located next to the .safetensors file.

Main issue is that there are no unified guidelines that people would/should follow when it comes to the names of the "models". There are no rules that state: If you are gonna make a Clothing LoRA, prefix must be Clothing or however else is agreed upon. Or, you are training an Artstyle, filename must be "Artist_NAME".

All of this is affected at the entry point when LoRA is set to be trained in the settings. Everybody is naming their LoRAs however they want and names are pretty inconsistent and, in some cases, do not have anything to do with the LoRA in question.

It could be a Clothing Lora, trying to replicate a certain style of Wedding Dress but the filename and it's trigger/bracket could be something else, like <lora:betrayal:1>... Totally unrelated.

I am trying to incorporate SD into my Image Editing and when I want to inpaint something and open the LoRA tab but can't remember how a certain Clothing piece is called, it's a wreck. Luckily for me, it eases up the search the fact that I usually download an original preview from the LoRA page.

Now, as we all know, there are LoRAs that are triggered by a certain phrase, regardless of the _<lora:XXXX:1>_ these are usually Artstyle LoRAs that are trying to mimic an artist. There are no additional trigger words besides the angle brackets.

There are LoRAs, like the one I just linked, that will work regardless of how you rename the original file. Example: [Hatsune Miku Magical Mirai 2023](https://civitai.com/models/144407/hatsune-miku-magical-mirai-2023) but when you download the model, it is named **1658378037724213726.safetensors**. If you keep it like that, all numbers and bunch, it will be added as such _<lora:1658378037724213726:1>_ to the prompt. If you rename the original file to **Hatsune.safetensors** it will be added to the prompt as _<lora:Hatsune:1>_ and it will still work.

There are LoRAs, like the newest [Poison Ivy](https://civitai.com/models/144392/poison-ivy-dc-injustice2) LoRA. Original File **PoisonIvy-10.safetensors** and regardless of how you rename the original file, added prompt will always be _<lora:PoisonIvy:1>_.

Initially, I tried organizing my LoRA folder by custom names, assigned by me on download. Artstyles would have a prefix "**_Artist - Name_**", Clothing would have a prefix "**_Clothing - Name of the dress_**", etc. But I've noticed that some LoRAs get broken and stop functioning when you rename the original file name and don't obey the rules of previous two examples that I've mentioned. For the life of me, I can't remember which ones did break. It's been a while since I tried that.

It's like an OCD for me to have things organized the certain way and when I open my LoRA tab, I'd like them sorted by cathegories, and by that, I mean custom names that can be assigned by us.

Am I making any sense? :)

### Proposed workflow

1. Go to Lora/Checkpoint/TI/Hypernetworks
2. Press "Edit Metadata" button
3. Assign custom name for the Lora/Checkpoint/TI/Hypernetworks
4. Add the option to sort LoRAs by those custom names.

### Additional information

_No response_