From e9f4ba021567cb1b131dee233301e360b0097afa Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 17 Jun 2023 20:41:49 -0400 Subject: [PATCH] guard against empty values --- modules/processing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/processing.py b/modules/processing.py index 8735c90b0..3d276e290 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -820,6 +820,8 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): self.applied_old_hires_behavior_to = None def init(self, all_prompts, all_seeds, all_subseeds): + self.width = self.width or 512 + self.height = self.height or 512 if self.enable_hr: if opts.use_old_hires_fix_width_height and self.applied_old_hires_behavior_to != (self.width, self.height): self.hr_resize_x = self.width