zero01101 / openOutpaint

local offline javascript and html canvas outpainting gizmo for stable diffusion webUI API 🐠
MIT License
500 stars 43 forks source link

[Bug]: I am unable to use the app due to an api error #266

Closed coldtoon closed 8 months ago

coldtoon commented 10 months ago

Is ths issue about the extension?

What happened?

New to the app not expecting errors from the start. Error log in add-info

Steps to reproduce the problem

  1. Go to .... img2img
  2. Press ....send to outpaint
  3. ... [etc] apply dream brush after stamping img 4.Red text error in bottom left appears/nothing happens to image

What should have happened?

context detect expand image

Commit where the problem happens

a4a0200f

What platforms do you use to access openOutpaint?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox

Browser Extensions/Addons

image

AUTOMATIC1111 webUI Commandline Arguments

Launching Web UI with arguments: --xformers --api --skip-python-version-check --no-half --no-download-sd-model

Additional information

*** API error: POST: http://127.0.0.1:7860/sdapi/v1/img2img {'error': 'TypeError', 'detail': '', 'body': '', 'errors': "'<' not supported between instances of 'int' and 'NoneType'"} Traceback (most recent call last): File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\anyio\streams\memory.py", line 98, in receive return self.receive_nowait() File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\anyio\streams\memory.py", line 93, in receive_nowait raise WouldBlock anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\base.py", line 78, in call_next
    message = await recv_stream.receive()
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\anyio\streams\memory.py", line 118, in receive
    raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\modules\api\api.py", line 187, in exception_handling
    return await call_next(request)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\base.py", line 84, in call_next
    raise app_exc
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\base.py", line 108, in __call__
    response = await self.dispatch_func(request, call_next)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\modules\api\api.py", line 151, in log_and_time
    res: Response = await call_next(req)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\base.py", line 84, in call_next
    raise app_exc
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\base.py", line 70, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\cors.py", line 92, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\cors.py", line 147, in simple_response
    await self.app(scope, receive, send)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__
    await responder(scope, receive, send)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
    raise exc
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
    raise e
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\routing.py", line 66, in app
    response = await func(request)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\fastapi\routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\fastapi\routing.py", line 165, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\starlette\concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\modules\api\api.py", line 403, in img2imgapi
    self.default_script_arg_img2img = self.init_default_script_args(script_runner)
  File "C:\Users\Cookie\Documents\StabilityMatrix\Packages\Stable Diffusion WebUI\modules\api\api.py", line 300, in init_default_script_args
    if last_arg_index < script.args_to:
TypeError: '<' not supported between instances of 'int' and 'NoneType'

zero01101 commented 8 months ago

disclaimer: apologies for the extended delay, my brain is terrible and you shouldn't expect much from me

i think this occurs if your img2img request doesn't include mask data somehow, could you try going to http://127.0.0.1:7860/docs#/default/img2imgapi_sdapi_v1_img2img_post, click "try it out", paste the contents of the attached file into the "request body" input, then click "execute"? it should return a base64 response if working properly

img2img.txt

coldtoon commented 8 months ago

it was because dreambooth installed fast api and that sent the request for data a loop I learned this because I updated(clean install) w/o dreambooth(or fast api) and your app works fine

zero01101 commented 8 months ago

good to know, appreciate it :)