TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.54k stars 1.31k forks source link

ValueError: height and width must be > 0 #1543

Open Gushousekai195 opened 1 year ago

Gushousekai195 commented 1 year ago

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 56, in f res = list(func(*args, *kwargs)) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 37, in f res = func(args, **kwargs) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/img2img.py", line 169, in img2img processed = process_images(p) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 486, in process_images res = process_images_inner(p) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 579, in process_images_inner p.init(p.all_prompts, p.all_seeds, p.all_subseeds) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 950, in init image_mask = images.resize_image(2, mask, self.width, self.height) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/images.py", line 300, in resize_image res.paste(resized.resize((width, fill_height), box=(0, 0, width, 0)), box=(0, 0)) File "/usr/local/lib/python3.8/dist-packages/PIL/Image.py", line 2082, in resize return self._new(self.im.resize(size, resample, box)) ValueError: height and width must be > 0

But the height and width are greater than 0!

image

scorpiomaj27 commented 4 months ago

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 56, in f res = list(func(*args, *kwargs)) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 37, in f res = func(args, **kwargs) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/img2img.py", line 169, in img2img processed = process_images(p) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 486, in process_images res = process_images_inner(p) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 579, in process_images_inner p.init(p.all_prompts, p.all_seeds, p.all_subseeds) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 950, in init image_mask = images.resize_image(2, mask, self.width, self.height) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/images.py", line 300, in resize_image res.paste(resized.resize((width, fill_height), box=(0, 0, width, 0)), box=(0, 0)) File "/usr/local/lib/python3.8/dist-packages/PIL/Image.py", line 2082, in resize return self._new(self.im.resize(size, resample, box)) ValueError: height and width must be > 0

But the height and width are greater than 0!

image

Try increasing the width or height by a very small amount, I don't know why, but it works, five pixels worked for me.