aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-18 23:20:23 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-01-18 23:20:23 +0300
commitb186d44dcd0df9d127a663b297334a5bd8258b58 (patch)
tree776c0888319124dad40d539a7d1a5db57eeb733d
parent3b61007a66d9f7c05fcce1a461d5907c1ce633dd (diff)
use DDIM in hires fix is the sampler is PLMS
-rw-r--r--modules/processing.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py
index 9c3673de..8c18ac53 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -857,7 +857,8 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
shared.state.nextjob()
- self.sampler = sd_samplers.create_sampler(self.sampler_name, self.sd_model)
+ img2img_sampler_name = self.sampler_name if self.sampler_name != 'PLMS' else 'DDIM' # PLMS does not support img2img so we just silently switch ot 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]