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

Crash when loading up web GUI #92

Open
CubeTheThird opened this issue Feb 8, 2024 · 4 comments
Open

Crash when loading up web GUI #92

CubeTheThird opened this issue Feb 8, 2024 · 4 comments

Comments

@CubeTheThird
Copy link

Upon launching invoke-train-ui, then opening the local URL, the GUI loads in browser, and immediately crashes.

Environment:

Arch Linux
Firefox 122
Python 3.10

Here is the output log when the crash occurs:

Resetting UI configs for SDXL LoRA and Textual Inversion to invokeai-training/venv/lib/python3.10/site-packages/invoke_training/sample_configs/sdxl_lora_and_ti_gnome_1x24gb.yaml.
Resetting UI configs for SDXL LoRA to invokeai-training/venv/lib/python3.10/site-packages/invoke_training/sample_configs/sdxl_lora_pokemon_1x24gb.yaml.
Resetting UI configs for SDXL Textual Inversion to invokeai-training/venv/lib/python3.10/site-packages/invoke_training/sample_configs/sdxl_textual_inversion_gnome_1x24gb.yaml.
Resetting UI configs for SD LoRA to invokeai-training/venv/lib/python3.10/site-packages/invoke_training/sample_configs/sd_lora_pokemon_1x8gb.yaml.
Resetting UI configs for SD Textual Inversion to invokeai-training/venv/lib/python3.10/site-packages/invoke_training/sample_configs/sd_textual_inversion_gnome_1x8gb.yaml.
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "invokeai-training/venv/lib/python3.10/site-packages/starlette/responses.py", line 264, in __call__
    await wrap(partial(self.listen_for_disconnect, receive))
  File "invokeai-training/venv/lib/python3.10/site-packages/starlette/responses.py", line 260, in wrap
    await func()
  File "invokeai-training/venv/lib/python3.10/site-packages/starlette/responses.py", line 237, in listen_for_disconnect
    message = await receive()
  File "invokeai-training/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 534, in receive
    await self.message_event.wait()
  File "invokeai-training/venv/lib/python3.10/asyncio/locks.py", line 214, in wait
    await fut
asyncio.exceptions.CancelledError: Cancelled by cancel scope 7340b3176f50

During handling of the above exception, another exception occurred:

  + Exception Group Traceback (most recent call last):
  |   File "invokeai-training/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 404, in run_asgi
  |     result = await app(  # type: ignore[func-returns-value]
  |   File "invokeai-training/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
  |     return await self.app(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
  |     await super().__call__(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
  |     await self.middleware_stack(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
  |     raise exc
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
  |     await self.app(scope, receive, _send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 83, in __call__
  |     await self.app(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
  |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
  |     raise exc
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
  |     await app(scope, receive, sender)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/routing.py", line 758, in __call__
  |     await self.middleware_stack(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/routing.py", line 778, in app
  |     await route.handle(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/routing.py", line 299, in handle
  |     await self.app(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/routing.py", line 79, in app
  |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
  |     raise exc
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
  |     await app(scope, receive, sender)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
  |     await response(scope, receive, send)
  |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/responses.py", line 257, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "invokeai-training/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | exceptiongroup.ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/responses.py", line 260, in wrap
    |     await func()
    |   File "invokeai-training/venv/lib/python3.10/site-packages/starlette/responses.py", line 249, in stream_response
    |     async for chunk in self.body_iterator:
    |   File "invokeai-training/venv/lib/python3.10/site-packages/gradio/routes.py", line 663, in sse_stream
    |     raise e
    |   File "invokeai-training/venv/lib/python3.10/site-packages/gradio/routes.py", line 604, in sse_stream
    |     raise HTTPException(
    | fastapi.exceptions.HTTPException: 404: Session not found.
    +------------------------------------
@RyanJDick
Copy link
Collaborator

When the app initially loads in the browser, it makes a call back to the server to load the default configs. It seems like this request is what's failing.

Can you check what gradio version you're on? I may have underspecified the supported gradio versions.

Also, just to confirm, are you running the browser on the same machine that you launched invoke-train-ui from?

@CubeTheThird
Copy link
Author

These are the versions listed for gradio:
gradio 4.17.0
gradio_client 0.9.0

I am also indeed running everything on the same machine.

@RyanJDick
Copy link
Collaborator

I tried testing with your gradio version and am not able to reproduce.

This appears to be the error of interest https://github.com/gradio-app/gradio/blob/2382f741ffac98c1d929e7b253abbc8f5508feaa/gradio/routes.py#L600-L607. It seems to happen while the gradio server is SSE-streaming the response, but I haven't dug further than that.

This active issue might be related: gradio-app/gradio#6920

@RyanJDick
Copy link
Collaborator

Also related: gradio-app/gradio#7189

I have now hit this issue once myself, but I can't reproduce it consistently.

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