lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.02k stars 781 forks source link

No "Live preview in full page image viewer" #1167

Open MathDC99 opened 2 months ago

MathDC99 commented 2 months ago

Live preview in full page image viewer doesn't work when clicked. It only displays as a thumbnail in UI.

EvanGuanSF commented 2 weeks ago

Quick and potentially dirty fix for those interested: in javascript/imageviewer.js, change line 180: var fullImg_preview = gradioApp().querySelectorAll('.gradio-gallery > button > button > img'); to var fullImg_preview = gradioApp().querySelectorAll('.gradio-gallery > button > button > img, .gradio-gallery > .livePreview');

Almost everything seems to already be in place in terms of code, it's just that the "toggle full screen gallery" event was never associated with the live preview element.

There is one side effect in the quick testing I've done: There's some incorrect buffering/temporary showing of the currently generating image when Show Live preview in full page image viewer is disabled (it should only show the last round of generated images I think), but the gallery image does comes up after a delay. (Possibly after a 'Live preview display period' number of steps and image update to force update the gallery?)

I'll leave it to people who actually know what's going on under the hood with options/flags and for more thorough testing and verification, I just wanted something that worked.