Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: images do not match #54

Open
peacetemple opened this issue Mar 25, 2023 · 2 comments
Open

ValueError: images do not match #54

peacetemple opened this issue Mar 25, 2023 · 2 comments

Comments

@peacetemple
Copy link

hi I'm getting this error message ValueError: images do not match during inpainting

while using this auto photoshop stablediffusion plugin

API error: POST: https://d8e87081614310d5ae.gradio.live/sdapi/v1/img2img {'error': 'ValueError', 'detail': '', 'body': '', 'errors': 'images do not match'}
Traceback (most recent call last):
File "/usr/local/envs/automatic/lib/python3.10/site-packages/anyio/streams/memory.py", line 94, in receive
return self.receive_nowait()
File "/usr/local/envs/automatic/lib/python3.10/site-packages/anyio/streams/memory.py", line 89, in receive_nowait
raise WouldBlock
anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/base.py", line 78, in call_next
message = await recv_stream.receive()
File "/usr/local/envs/automatic/lib/python3.10/site-packages/anyio/streams/memory.py", line 114, in receive
raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/content/stable-diffusion-webui/modules/api/api.py", line 144, in exception_handling
return await call_next(request)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next
raise app_exc
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/base.py", line 108, in call
response = await self.dispatch_func(request, call_next)
File "/content/stable-diffusion-webui/modules/api/api.py", line 109, in log_and_time
res: Response = await call_next(req)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next
raise app_exc
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call
await responder(scope, receive, send)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call
await self.app(scope, receive, self.send_with_gzip)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/usr/local/envs/automatic/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "/usr/local/envs/automatic/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/envs/automatic/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/envs/automatic/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/content/stable-diffusion-webui/modules/api/api.py", line 355, in img2imgapi
processed = process_images(p)
File "/content/stable-diffusion-webui/modules/processing.py", line 486, in process_images
res = process_images_inner(p)
File "/content/stable-diffusion-webui/modules/processing.py", line 694, 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 "/usr/local/envs/automatic/lib/python3.10/site-packages/PIL/Image.py", line 3341, in composite
image.paste(image1, None, mask)
File "/usr/local/envs/automatic/lib/python3.10/site-packages/PIL/Image.py", line 1731, in paste
self.im.paste(im, box, mask.im)
ValueError: images do not match

does anyone know what I can do?

@dimroce
Copy link

dimroce commented Mar 29, 2023

I'm having the same issue, both i2i and inpainting,and I don't know how to roll back to a previous version :(

@peacetemple
Copy link
Author

automatic old version

what you can do is go to the ' run the script ' section and replace 'git pull' with ' git checkout a9eab236d7e8afa4d6205127904a385b2c43bb24 ' as suggested in https://www.reddit.com/r/StableDiffusion/comments/1244wv8/how_to_revert_auto1111_to_older_update_to_fix/

have fun!

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

No branches or pull requests

2 participants