Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

ValueError: images do not match #27

Open
BuQingYan opened this issue Apr 19, 2023 · 1 comment
Open

ValueError: images do not match #27

BuQingYan opened this issue Apr 19, 2023 · 1 comment

Comments

@BuQingYan
Copy link

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
Copy link

okingjo commented Apr 19, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants