diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-03-11 11:45:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-11 11:45:31 +0300 |
commit | a11ce2b96cc933ebb9e10d46603a89457ddcb9df (patch) | |
tree | 4c9efccb08f591e3a27b7dab6e39ce4adab17bab /modules/processing.py | |
parent | 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8 (diff) | |
parent | 5fef67f6ee949a61826a3a043ea8610fd89fc371 (diff) |
Merge pull request #7710 from space-nuko/unipc
Implement UniPC sampler
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py index 2009d3bf..0b2f7e60 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -888,7 +888,9 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): shared.state.nextjob()
- 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
+ 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]
|