From 3f29aa791bceea0b0de99263dd0a7f08c0551549 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Sun, 18 Sep 2022 11:14:42 +0300 Subject: 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 --- javascript/progressbar.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'javascript/progressbar.js') diff --git a/javascript/progressbar.js b/javascript/progressbar.js index 1fcd544c..065f259b 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -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(); +} + -- cgit v1.2.3