aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_samplers_common.py
diff options
context:
space:
mode:
authorSakura-Luna <53183413+Sakura-Luna@users.noreply.github.com>2023-05-14 05:19:11 +0000
committerSakura-Luna <53183413+Sakura-Luna@users.noreply.github.com>2023-05-14 06:06:02 +0000
commitbd9b9d425a355e151b43047a5df5fcead2fcdc52 (patch)
tree4bc438de3ab2a063fc794d36ce056776a5511263 /modules/sd_samplers_common.py
parente14b586d0494d6c5cc3cbc45b5fa00c03d052443 (diff)
downloadstable-diffusion-webui-gfx803-bd9b9d425a355e151b43047a5df5fcead2fcdc52.tar.gz
stable-diffusion-webui-gfx803-bd9b9d425a355e151b43047a5df5fcead2fcdc52.tar.bz2
stable-diffusion-webui-gfx803-bd9b9d425a355e151b43047a5df5fcead2fcdc52.zip
Add live preview mode check
Diffstat (limited to 'modules/sd_samplers_common.py')
-rw-r--r--modules/sd_samplers_common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/sd_samplers_common.py b/modules/sd_samplers_common.py
index d3dc130c..b1e8a780 100644
--- a/modules/sd_samplers_common.py
+++ b/modules/sd_samplers_common.py
@@ -26,8 +26,8 @@ approximation_indexes = {"Full": 0, "Tiny AE": 1, "Approx NN": 2, "Approx cheap"
def single_sample_to_image(sample, approximation=None):
- if approximation is None:
- approximation = approximation_indexes.get(opts.show_progress_type, 0)
+ if approximation is None or approximation not in approximation_indexes.keys():
+ approximation = approximation_indexes.get(opts.show_progress_type, 1)
if approximation == 1:
x_sample = sd_vae_taesd.decode()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach()