diff --git a/modules/processing.py b/modules/processing.py index b3206f80..65673a9d 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -864,8 +864,8 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): 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 - if self.hr_sampler != 0 and sd_samplers.samplers[self.hr_sampler].name != 'PLMS': - img2img_sampler_name = sd_samplers.samplers[self.hr_sampler].name + if self.hr_sampler != 0 and self.hr_sampler != 'PLMS': + img2img_sampler_name = self.hr_sampler self.sampler = sd_samplers.create_sampler(img2img_sampler_name, self.sd_model) diff --git a/modules/txt2img.py b/modules/txt2img.py index 21f48d12..3d16ac5b 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -39,7 +39,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step hr_resize_x=hr_resize_x, hr_resize_y=hr_resize_y, hr_sampler=sd_samplers.samplers[hr_sampler_index].name - if hr_sampler_index != 0 else sd_samplers.samplers[sampler_index].name + if hr_sampler_index != 0 else 0 ) p.scripts = modules.scripts.scripts_txt2img