Closed silveroxides closed 4 months ago
Thanks for pointing out the issue, after a quick skim it looks like the issue is caused by a little oversight, there is a condition where it states
if create_html and not os.path.exists(html_path) or overwrite_toggle
So it looks like it currently generates a new HTML file when the overwrite toggle is on regardless of other options. Will include a fix for this in the next update when I finally have some time to write new changes :,) šš»
About your comment stating that the code is unoptimized, it most definitely is and that's not gonna change anytime soon. I'm not by any means experienced when it comes to python code nor the inner working of the Gradio UI library. This is, after all, a solo project I made in my free time with little to no experience. (And not a paid program where you can expect quality)
Made a small hotfix to the line which should hopefully resolve your issues, can't test the code right now as I won't be home for a while/won't be able to run SD-Webui for a while, so let me know it has fixed the issue šš»
Working as intended now. 186 models took ~6 seconds post API call to update info and tags for which is a huge improvement.
Describe the bug.
The extension updates html of each model while "Overwrite any existing files. (previews, HTMLs, tags, descriptions)" is checked even if "Save HTML file for each model when updating info & tags (increases process time)." is unchecked. If the mentioned issue is working as intended then the should be "increses process time" warning there too or at least and indicator that it enabled all html download.
Can't say I was happy to see 1631 files being processed and since the extension chooses to display each file gone through as a progress update in gradio the entire browser is having staggering issues. It peaked at around 420 at which the tab crashed. You can see by my system specs that it is not a slow PC. Maybe consider if your code might need some optimization
Steps to reproduce the problem.
Go to Update Models. Repeat the actions I described.
Expected behavior
Not to Download 1631 html unless "Save HTML file for each model when updating info & tags (increases process time)." is checked while "Overwrite any existing files. (previews, HTMLs, tags, descriptions)" is checked.
System info
Console logs
Additional information
No response