aboutsummaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-18 11:14:42 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-09-18 11:14:42 +0300
commit3f29aa791bceea0b0de99263dd0a7f08c0551549 (patch)
tree5eb9b04951fbb6b50ea0afe134bac1b1330bec86 /javascript
parentb273458d2d37ec59f61d5008bbfb7be2c3013850 (diff)
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
Diffstat (limited to 'javascript')
-rw-r--r--javascript/progressbar.js12
-rw-r--r--javascript/ui.js2
2 files changed, 11 insertions, 3 deletions
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();
+}
+
diff --git a/javascript/ui.js b/javascript/ui.js
index e649dc6e..c39e96a1 100644
--- a/javascript/ui.js
+++ b/javascript/ui.js
@@ -37,7 +37,7 @@ function extract_image_from_gallery_extras(gallery){
function submit(){
// this calls a function from progressbar.js
- window.setTimeout(requestProgress, 500)
+ requestProgress()
res = []
for(var i=0;i<arguments.length;i++){