js optimizations

This commit is contained in:
Vladimir Mandic
2023-06-05 14:25:57 -04:00
parent c52fb69dde
commit efbe364f7d
30 changed files with 697 additions and 70 deletions
+1 -2
View File
@@ -1,4 +1,3 @@
/* global gradioApp, onUiUpdate */
// attaches listeners to the txt2img and img2img galleries to update displayed generation param text when the image changes
function attachGalleryListeners(tab_name) {
@@ -22,7 +21,7 @@ let txt2img_gallery;
let img2img_gallery;
let modal;
onUiUpdate(() => {
onAfterUiUpdate(() => {
if (!txt2img_gallery) txt2img_gallery = attachGalleryListeners('txt2img');
if (!img2img_gallery) img2img_gallery = attachGalleryListeners('img2img');
if (!modal) {