glucauze / sd-webui-faceswaplab

Extended faceswap extension for StableDiffusion web-ui with multiple faceswaps, inpainting, checkpoints, ....
https://glucauze.github.io/sd-webui-faceswaplab/
GNU Affero General Public License v3.0
748 stars 100 forks source link

Fixed bug in apply mask #185

Open jaesimio opened 6 months ago

jaesimio commented 6 months ago

178 #184,

Fixed for not working img2img(inpaint) and txt2img

UnconnectedBedna commented 6 months ago

Would be really great if this could be accepted.

ali0une commented 1 month ago

Hi there.

Doesn't work for me when inpainting.

Python 3.10.6 (main, Nov 25 2023, 07:13:39) [GCC 12.2.0]
Version: v1.10.0
Commit hash: c19d04436496ab29ddca4758a792831ae41b31de
ERROR:    Exception in ASGI application███████████████████████████████████████████████████████████| 25/25 [00:12<00:00,  3.62it/s]
Traceback (most recent call last):
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/encoders.py", line 152, in jsonable_encoder
    data = dict(obj)
ValueError: dictionary update sequence element #0 has length 3; 2 is required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/encoders.py", line 157, in jsonable_encoder
    data = vars(obj)
TypeError: vars() argument must have __dict__ attribute

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/applications.py", line 273, in __call__
    await super().__call__(scope, receive, send)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in __call__
    await self.app(scope, receive, send)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 26, in __call__
    await self.app(scope, receive, send)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 255, in app
    content = await serialize_response(
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 152, in serialize_response
    return jsonable_encoder(response_content)
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/encoders.py", line 117, in jsonable_encoder
    encoded_value = jsonable_encoder(
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/encoders.py", line 131, in jsonable_encoder
    jsonable_encoder(
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/encoders.py", line 131, in jsonable_encoder
    jsonable_encoder(
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/encoders.py", line 131, in jsonable_encoder
    jsonable_encoder(
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/encoders.py", line 161, in jsonable_encoder
    return jsonable_encoder(
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/encoders.py", line 117, in jsonable_encoder
    encoded_value = jsonable_encoder(
  File "/whatever/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/encoders.py", line 160, in jsonable_encoder
    raise ValueError(errors) from e
ValueError: [ValueError('dictionary update sequence element #0 has length 3; 2 is required'), TypeError('vars() argument must have __dict__ attribute')]