aboutsummaryrefslogtreecommitdiff
path: root/javascript/textualInversion.js
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-15 18:50:56 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-01-15 18:51:04 +0300
commitd8b90ac121cbf0c18b1dc9d56a5e1d14ca51e74e (patch)
tree0b204c9db8ee98972adbc2619a41c7f508369031 /javascript/textualInversion.js
parentebfdd7baeb660ec66f78e1a0e5e45442025f262d (diff)
big rework of progressbar/preview system to allow multiple users to prompts at the same time and do not get previews of each other
Diffstat (limited to 'javascript/textualInversion.js')
-rw-r--r--javascript/textualInversion.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/javascript/textualInversion.js b/javascript/textualInversion.js
index 8061be08..0354b860 100644
--- a/javascript/textualInversion.js
+++ b/javascript/textualInversion.js
@@ -1,8 +1,17 @@
+
function start_training_textual_inversion(){
- requestProgress('ti')
gradioApp().querySelector('#ti_error').innerHTML=''
- return args_to_array(arguments)
+ var id = randomId()
+ requestProgress(id, gradioApp().getElementById('ti_output'), gradioApp().getElementById('ti_gallery'), function(){}, function(progress){
+ gradioApp().getElementById('ti_progress').innerHTML = progress.textinfo
+ })
+
+ var res = args_to_array(arguments)
+
+ res[0] = id
+
+ return res
}