mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
guard against images list and avoid pipeline switches
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -483,9 +483,9 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
||||
self.width = int(vae_scale_factor * (self.init_images[0].width * self.scale_by // vae_scale_factor))
|
||||
if self.height is None or self.height == 0:
|
||||
self.height = int(vae_scale_factor * (self.init_images[0].height * self.scale_by // vae_scale_factor))
|
||||
if getattr(self, 'image_mask', None) is not None:
|
||||
if (getattr(self, 'image_mask', None) is not None) and (len(getattr(self, 'image_mask', [])) > 0):
|
||||
shared.sd_model = sd_models.set_diffuser_pipe(self.sd_model, sd_models.DiffusersTaskType.INPAINTING)
|
||||
elif getattr(self, 'init_images', None) is not None:
|
||||
elif (getattr(self, 'init_images', None) is not None) and (len(getattr(self, 'init_images', [])) > 0):
|
||||
shared.sd_model = sd_models.set_diffuser_pipe(self.sd_model, sd_models.DiffusersTaskType.IMAGE_2_IMAGE)
|
||||
|
||||
if all_prompts is not None:
|
||||
|
||||
Reference in New Issue
Block a user