fix gallery display during generate

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-12-21 14:19:51 -05:00
parent 11b2a055c3
commit e458e3e448
3 changed files with 8 additions and 3 deletions
+6 -2
View File
@@ -70,9 +70,13 @@ function requestProgress(id_task, progressEl, galleryEl, atEnd = null, onProgres
const initLivePreview = () => {
if (!parentGallery) return;
const footers = Array.from(gradioApp().querySelectorAll('.gallery_footer'));
for (const footer of footers) footer.style.display = 'none'; // remove all footers
for (const footer of footers) {
if (footer.id !== 'gallery_footer') footer.style.display = 'none'; // remove all footers
}
const galleries = Array.from(gradioApp().querySelectorAll('.gallery_main'));
for (const gallery of galleries) gallery.style.display = 'none'; // remove all footers
for (const gallery of galleries) {
if (gallery.id !== 'gallery_gallery') gallery.style.display = 'none'; // remove all footers
}
livePreview = document.createElement('div');
livePreview.className = 'livePreview';