diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-03 14:40:20 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-03 14:40:20 +0000 |
commit | e9fb9bb0c25f59109a816fc53c385bed58965c24 (patch) | |
tree | 1a478e3611950e04c7a6866bb46e27a421fdc787 /modules/processing.py | |
parent | c0ee1488702d5a6ae35fbf7e0422f9f685394920 (diff) | |
download | stable-diffusion-webui-gfx803-e9fb9bb0c25f59109a816fc53c385bed58965c24.tar.gz stable-diffusion-webui-gfx803-e9fb9bb0c25f59109a816fc53c385bed58965c24.tar.bz2 stable-diffusion-webui-gfx803-e9fb9bb0c25f59109a816fc53c385bed58965c24.zip |
fix hires fix not working in API when user does not specify upscaler
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py index 4654570c..a172af0b 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -685,7 +685,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): def sample(self, conditioning, unconditional_conditioning, seeds, subseeds, subseed_strength, prompts):
self.sampler = sd_samplers.create_sampler(self.sampler_name, self.sd_model)
- latent_scale_mode = shared.latent_upscale_modes.get(self.hr_upscaler, None) if self.hr_upscaler is not None else shared.latent_upscale_default_mode
+ latent_scale_mode = shared.latent_upscale_modes.get(self.hr_upscaler, None) if self.hr_upscaler is not None else shared.latent_upscale_modes.get(shared.latent_upscale_default_mode, "nearest")
if self.enable_hr and latent_scale_mode is None:
assert len([x for x in shared.sd_upscalers if x.name == self.hr_upscaler]) > 0, f"could not find upscaler named {self.hr_upscaler}"
|