diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-18 20:20:23 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-18 20:20:23 +0000 |
commit | b186d44dcd0df9d127a663b297334a5bd8258b58 (patch) | |
tree | 776c0888319124dad40d539a7d1a5db57eeb733d /modules/processing.py | |
parent | 3b61007a66d9f7c05fcce1a461d5907c1ce633dd (diff) | |
download | stable-diffusion-webui-gfx803-b186d44dcd0df9d127a663b297334a5bd8258b58.tar.gz stable-diffusion-webui-gfx803-b186d44dcd0df9d127a663b297334a5bd8258b58.tar.bz2 stable-diffusion-webui-gfx803-b186d44dcd0df9d127a663b297334a5bd8258b58.zip |
use DDIM in hires fix is the sampler is PLMS
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 3 |
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]
|