Improve responsiveness of UI startup by not waiting for render threads to start up before showing the UI. Errors while starting the render thread will be logged anyway, so there's no need to block the main thread for this

This commit is contained in:
cmdr2
2023-07-08 23:28:47 +05:30
parent 2bd1cceb24
commit 37e8158175
8 changed files with 63 additions and 49 deletions

View File

@@ -627,9 +627,9 @@ class ModelDropdown {
}
/* (RE)LOAD THE MODELS */
async function getModels() {
async function getModels(scanForMalicious = true) {
try {
modelsCache = await SD.getModels()
modelsCache = await SD.getModels(scanForMalicious)
modelsOptions = modelsCache["options"]
if ("scan-error" in modelsCache) {
// let previewPane = document.getElementById('tab-content-wrapper')
@@ -667,4 +667,4 @@ async function getModels() {
}
// reload models button
document.querySelector("#reload-models").addEventListener("click", getModels)
document.querySelector("#reload-models").addEventListener("click", () => getModels())