aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
authorspace-nuko <24979496+space-nuko@users.noreply.github.com>2023-02-10 22:30:35 +0000
committerspace-nuko <24979496+space-nuko@users.noreply.github.com>2023-02-10 22:30:35 +0000
commitfb274229b2c5c1a89dac0b3da28c08c92d71fd95 (patch)
treef6cff390ca38b2e027e1fb43a5856bae9f87b3ef /modules/processing.py
parent06cb0dc92095647e4856be10b4d7dc12f5e11fa1 (diff)
downloadstable-diffusion-webui-gfx803-fb274229b2c5c1a89dac0b3da28c08c92d71fd95.tar.gz
stable-diffusion-webui-gfx803-fb274229b2c5c1a89dac0b3da28c08c92d71fd95.tar.bz2
stable-diffusion-webui-gfx803-fb274229b2c5c1a89dac0b3da28c08c92d71fd95.zip
bug fix
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py
index b7cf5357..0ca15491 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -884,7 +884,9 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
shared.state.nextjob()
- img2img_sampler_name = 'DDIM' # PLMS/UniPC does not support img2img so we just silently switch ot DDIM
+ img2img_sampler_name = self.sampler_name
+ if self.sampler_name in ['PLMS', 'UniPC']: # PLMS/UniPC do not support img2img so we just silently switch to DDIM
+ img2img_sampler_name = 'DDIM'
self.sampler = sd_samplers.create_sampler(img2img_sampler_name, self.sd_model)
samples = samples[:, :, self.truncate_y//2:samples.shape[2]-(self.truncate_y+1)//2, self.truncate_x//2:samples.shape[3]-(self.truncate_x+1)//2]