OedoSoldier / sd-webui-image-sequence-toolkit

Extension for AUTOMATIC111's WebUI
Apache License 2.0
564 stars 41 forks source link

ValueError: images do not match #27

Open BuQingYan opened 1 year ago

BuQingYan commented 1 year ago

Something went wrong when I used the multi-frame render script on img2img. Error Message: Traceback (most recent call last): File "E:\ai2\sd-webui-aki-v4\modules\call_queue.py", line 56, in f res = list(func(*args, *kwargs)) File "E:\ai2\sd-webui-aki-v4\modules\call_queue.py", line 37, in f res = func(args, *kwargs) File "E:\ai2\sd-webui-aki-v4\modules\img2img.py", line 170, in img2img processed = modules.scripts.scripts_img2img.run(p, args) File "E:\ai2\sd-webui-aki-v4\modules\scripts.py", line 407, in run processed = script.run(p, *script_args) File "E:\ai2\sd-webui-aki-v4\extensions\enhanced-img2img\scripts\multi_frame_rendering.py", line 450, in run processed = processing.process_images(p) File "E:\ai2\sd-webui-aki-v4\modules\processing.py", line 503, in process_images res = process_images_inner(p) File "E:\ai2\sd-webui-aki-v4\modules\processing.py", line 711, in process_images_inner image_mask_composite = Image.composite(image.convert('RGBA').convert('RGBa'), Image.new('RGBa', image.size), p.mask_for_overlay.convert('L')).convert('RGBA') File "E:\ai2\sd-webui-aki-v4\py310\lib\site-packages\PIL\Image.py", line 3341, in composite image.paste(image1, None, mask) File "E:\ai2\sd-webui-aki-v4\py310\lib\site-packages\PIL\Image.py", line 1731, in paste self.im.paste(im, box, mask.im) ValueError: images do not match

okingjo commented 1 year ago

I encountered the same issue, and solved by changing the resolution, make sure that the aspect ratio is exactly equal to your input images, for example, if the original images are 1920x1080, you can only set resolution to 16:9 tight. the SD might change your resolution automatically so be careful. I think it is because script will put 3 images together during the generation, thus mismatch of resolution will cause that error.