Update smart_process.js
Signed-off-by: Martino Bettucci <martinobettucci@users.noreply.github.com>pull/21/head
parent
330f47f859
commit
231cda38df
|
|
@ -1,9 +1,28 @@
|
||||||
function start_smart_process() {
|
const SP_PROGRESSBAR_LABEL = 'sp_preview'
|
||||||
requestProgress('sp');
|
const SP_GALLERY_LABEL = 'sp_gallery'
|
||||||
gradioApp().querySelector('#sp_error').innerHTML = '';
|
const SP_ERROR_LABEL = '#sp_error'
|
||||||
return args_to_array(arguments);
|
const SP_GALLERY_CHILD = 'sp_gallery_kid';
|
||||||
}
|
const SP_PROGRESS_LABEL = 'sp_progress';
|
||||||
|
|
||||||
onUiUpdate(function () {
|
function start_smart_process() {
|
||||||
check_progressbar('sp', 'sp_progressbar', 'sp_progress_span', '', 'sp_interrupt', 'sp_preview', 'sp_gallery')
|
rememberGallerySelection(SP_GALLERY_LABEL)
|
||||||
})
|
gradioApp().querySelector('#sp_error').innerHTML = ''
|
||||||
|
var daGalleryElt = gradioApp().getElementById(SP_GALLERY_LABEL)
|
||||||
|
// set id of first child of daGalleryElt to 'sp_gallery_kid',
|
||||||
|
// required by AUTOMATIC1111 UI Logic
|
||||||
|
daGalleryElt.children[0].id = SP_GALLERY_CHILD
|
||||||
|
var id = randomId();
|
||||||
|
requestProgress(id,
|
||||||
|
gradioApp().getElementById(SP_GALLERY_LABEL),
|
||||||
|
gradioApp().getElementById(SP_GALLERY_CHILD),
|
||||||
|
function () {
|
||||||
|
},
|
||||||
|
function (progress) {
|
||||||
|
gradioApp().getElementById(SP_PROGRESS_LABEL).innerHTML = progress.textinfo
|
||||||
|
})
|
||||||
|
|
||||||
|
const argsToArray = args_to_array(arguments);
|
||||||
|
argsToArray.push(argsToArray[0])
|
||||||
|
argsToArray[0] = id;
|
||||||
|
return argsToArray
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue