altered progressbar to not rely on first progress request coming after the job has started; may help with broken progressbar some people say they have

This commit is contained in:
AUTOMATIC
2022-09-18 11:14:42 +03:00
parent b273458d2d
commit 3f29aa791b
4 changed files with 47 additions and 26 deletions

View File

@@ -24,15 +24,23 @@ onUiUpdate(function(){
img2img_preview.style.height = img2img_gallery.clientHeight + "px"
}
window.setTimeout(requestProgress, 500)
window.setTimeout(requestMoreProgress, 500)
});
mutationObserver.observe( progressbar, { childList:true, subtree:true })
}
})
function requestProgress(){
function requestMoreProgress(){
btn = gradioApp().getElementById("check_progress");
if(btn==null) return;
btn.click();
}
function requestProgress(){
btn = gradioApp().getElementById("check_progress_initial");
if(btn==null) return;
btn.click();
}