diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-12-14 06:59:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 06:59:48 +0000 |
commit | d45f790f583f84d338cda4d6951ad8bd4a548008 (patch) | |
tree | 1f5270dc957867f53601313d0210cd0b5dbb75ec | |
parent | 8c32594d3ba74a599727486ecfa7dc52b7713d37 (diff) | |
parent | 9d2cbf8e97832662e446145d3961c39e78919d3d (diff) | |
download | stable-diffusion-webui-gfx803-d45f790f583f84d338cda4d6951ad8bd4a548008.tar.gz stable-diffusion-webui-gfx803-d45f790f583f84d338cda4d6951ad8bd4a548008.tar.bz2 stable-diffusion-webui-gfx803-d45f790f583f84d338cda4d6951ad8bd4a548008.zip |
Merge pull request #14230 from AUTOMATIC1111/add-option-Live-preview-in-full-page-image-viewer
add option: Live preview in full page image viewer
-rw-r--r-- | javascript/imageviewer.js | 2 | ||||
-rw-r--r-- | modules/shared_options.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js index e4dae91b..625c5d14 100644 --- a/javascript/imageviewer.js +++ b/javascript/imageviewer.js @@ -34,7 +34,7 @@ function updateOnBackgroundChange() { if (modalImage && modalImage.offsetParent) { let currentButton = selected_gallery_button(); let preview = gradioApp().querySelectorAll('.livePreview > img'); - if (preview.length > 0) { + if (opts.js_live_preview_in_modal_lightbox && preview.length > 0) { // show preview image if available modalImage.src = preview[preview.length - 1].src; } else if (currentButton?.children?.length > 0 && modalImage.src != currentButton.children[0].src) { diff --git a/modules/shared_options.py b/modules/shared_options.py index acb6e2d4..41097d8e 100644 --- a/modules/shared_options.py +++ b/modules/shared_options.py @@ -331,6 +331,7 @@ options_templates.update(options_section(('ui', "Live previews", "ui"), { "live_preview_content": OptionInfo("Prompt", "Live preview subject", gr.Radio, {"choices": ["Combined", "Prompt", "Negative prompt"]}),
"live_preview_refresh_period": OptionInfo(1000, "Progressbar and preview update period").info("in milliseconds"),
"live_preview_fast_interrupt": OptionInfo(False, "Return image with chosen live preview method on interrupt").info("makes interrupts faster"),
+ "js_live_preview_in_modal_lightbox": OptionInfo(True, "Show Live preview in full page image viewer"),
}))
options_templates.update(options_section(('sampler-params', "Sampler parameters", "sd"), {
|