#how2make thumbs for all your loras without losing your mind I have 300+ loras as of this writing, not counting epochs from my own training and the ones I have parked on an external SSD (don't ask). Unsurprisingly, I can't remember at all times how all of them look like when used. Manually genning and saving one preview for each of them with webui's atrocious UI responsiveness would give me an aneurysm. So I wrote this because I don't really have the time nor energy to write a full webui plugin or a full bash script. Here's what I do mostly in bash whenever I want to make thumbnails. ```Steps that are only code like this are meant to be run in bash.``` The goal is creating a png for each lora/lyco that matches its filename, and place it beside it in the directory. -First we need to determine which loras we do not have a preview picture for yet. You might want to skip this step and overwrite old thumbnails for consistency, but it will obviously take longer. ```cd``` to your /Lora directory. -```ls *.safetensors | cut -d\. -f1 | sort > a.txt``` -```ls *.png | cut -d\. -f1 | sort > b.txt``` -```comm -32 a.txt b.txt > c.txt``` -"c.txt" now contains the list of lora names lacking a matching thumbnail. Open in a text editor and replace all newlines with commas. ~~there probably is a way to do all of the previous in a one liner but fuck me if I didn't try~~ -In settings of your webui, take note of your current "images filename pattern" setting and change it momentarily to "[prompt_no_styles]". Change it back after we're done if you want. -Use a good, general purpose model. Based65 for example. -Prepare a prompt for XYZ using the first lora on your list. Make sure to place the lora first thing in the prompt. I also recommend to give it more strength to rely less on text encoder/activation words. I go with ``` masterpiece, upper body, 1girl, Boxer Shorts``` and negatives ```(low quality, low resolution:1.3), motion lines, (multiple views:1.15)``` -448x640 works good enough for the size of the previews. You may go higher with this aspect ratio if you want. Keep batch count and size at 1, we can't have multiples for this. Steps, sampler, etc up to preference. -XYZ plot with only Prompt S/R for X and use the comma-separated list from c.txt as its value. -When it's done, go to your txt2img-images outputs folder and copy/move all the newly generated individual pictures of the grid to a new empty folder. ```cd``` in bash to this folder. -Notice the next command uses the lora's strength as an anchor point for the second replacement, correct it accordingly if you're using a different value. -```for file in *.png; do echo "$file" | mv "$file" "$(sed -r "s/_lora_//" | sed -r "s/_1.25.*//").png" ;done``` -Your .pngs should've been succesfully renamed. Move them to your /Lora directory. You're done! Refresh your lora tab in webui to check the changes. This process is quick and easy for style and character loras. It's really hit and miss with concept loras but you probably already know what are those supposed to do from their filenames alone. ##SILLY PENGUIN, HUMANS USE WINDOWS! I am truly sorry for your loss. Here's some things that you can try: -Set up Windows Subsystem for Linux -Set up a Linux VM -Install MinGW, which should contain bash as an exe. -~~do my homework and actually write a script/webui plugin that does all of the above~~