-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue]: Long wait times before generation and display of Extra Networks after every launch, due to large amounts of Loras and Checkpoints #14507
Comments
I don't think the browser loading thumbnails is the cause I'm guessing it has more to do with I made a PR that should reduce unnecessary re-indexed of extra networks directory |
Thank you for looking into it. Just tried it and the first generation right after launching the UI goes through as expected, but after about a minute or so passes a second generation still gets stuck and the Extra Networks tabs still take about the same long time to load. |
See if this PR #14528 makes it any better. |
Thank you, sadly still experiencing long load times. It could also be something on my side, maybe a specific Lora, Checkpoint or Embedding causing it, or even a thumbnail. Load times with these many models were always a bit longer than desired but tolerable, then it started being much worse recently, started noticing it on commits around or after the 31st of December. I'll keep checking if it's a file causing it on my side meanwhile. |
Just tested with a much lower but still substantial amount of Loras, about 7k from the full 31k. (4 of the 5 subfolders I have: Loras trained on my pictures, general Loras trained by me, character Loras and concept Loras, leaving out style Loras). With just that amount of Loras, the Extra Networks tabs both refreshed and loaded in about 3-5 seconds max, so can confirm both recent PRs do work as intended, as they would have loaded and refreshed noticeably slower before. Adding the rest of the Loras (the much larger Style Loras subfolder) is when it chokes, so it might be a particular file in there, or also the sheer amount of extra files in that one folder, 48,557 to be exact including thumbnails. |
Can you revert to a commit before 31st of December to check if it really would start working well again? |
mass file lister as an attempt to tackle #14507
Reverted to commits from the 28th and then 22nd of December, long load times still are there, so it is definitely something on my side, either a particular Lora downloaded recently or even something else system related. I'd say this is closed for now as the commits to address this issue did help, and with a more manageable amount of Loras the Extra Networks tabs do load substantially faster than before. Will update later on if I find something else related. |
I'm actually still having this issue after getting the latest dev commit on Jan 05, were you able to find the problematic LORA? |
Not a particular Lora but I had a hunch it might be related to certain characters in their filename and it seems to be the case. I used this regex I also DeepL translated some Loras with chinese characters beforehand so the renaming process didn't completely erase their name. Some files also outright had garbage characters for whatever Civitai reason. Not sure which particular character or characters might have been causing it though, but leaving only those characters in the regex above fixed it completely. Two other things I did, in case it's a compound issue: |
I see, what if you re-download the same lora, but you've altered the filename, how do you keep track to prevent a duplicate? |
Hashes could help, Civitai Helper also has a duplicates finder that uses hashes but I don't know how good it is since haven't tried it. A lot of files on Civitai have really unhelpful names, and even using their metadata names instead of their filenames doesn't really help and makes things worse sometimes, so it's better to rename them anyway. Now what needs to be tested is which particular character or characters cause the Extra Networks list to take considerably longer to load, when I have more time I'll do some tests. But that might be a general filesystem issue rather than a particular bug with the web UI. |
Yeah I wasn't sure if it was a good idea to change their names, but I suppose it's worth a shot. I'm just worried about having to re-reference any foreign language on an image I found later, but if I just left foreign characters alone, would it have a drastic difference in loading times. But thank you for the tips though, very helpful! |
Checklist
What happened?
When having a ridiculous amount of Loras (pic related), the web UI takes a very long time before generations can start getting processed, due to it loading all the Extra Network files. This means even after pressing the Generate button, it takes way too long, about 5 to 10 min, before the generation finally starts getting processed and rendered.
There's no substantial and noticeably high HDD activity or logs while this is happening, it might just be the browser or Gradio caching or loading every thumbnail and data. This is with just the Lora and checkpoint .safetensors and their corresponding thumbnail, no additional .json or .info files made by Civitai Helper.
The Extra Networks UI understandably displays a loading icon while this is happening, and once the thumbnails are displayed, generations and overall UI usage is normal and as expected.
However, this happens on every single relaunch of the UI. This is different to the understandably longer load on the very first .bat launch after a fresh reboot. Maybe this will make it easier to understand:
.bat launch load times when having too many Loras
First .bat launch on fresh PC (re)boot: About 5 minutes max.
Every subsequent launch: 1 minute max.
Load times for Extra Networks tabs and wait time until generations can get processed, when having too many Loras: 5 to 10 minutes on every load and reload.
I've noticed at least on Librewolf, the web UI doesn't store any cache files in the browser's cache. Maybe having a way to save the Extra Networks thumbnails in the browser's persistent cache could alleviate the issue, but unsure if that's possible or if it would help.
Steps to reproduce the problem
What should have happened?
What browsers do you use to access the UI ?
Mozilla Firefox, Other
Sysinfo
sysinfo-2024-01-02-17-40.json
Console logs
Additional information
No response
The text was updated successfully, but these errors were encountered: