javsezlol1 / Stylez

111 stars 8 forks source link

After loading the WebUI a long list of errors appears in the console #16

Closed ostap667inbox closed 11 months ago

ostap667inbox commented 11 months ago

After loading the WebUI a long list of such errors appears in the console. Here is last WebUI messages in console after startup and then errors:

Applying attention optimization: xformers... done.
Model loaded in 12.7s (load weights from disk: 1.7s, create model: 1.1s, apply weights to model: 7.3s, apply channels_last: 0.3s, apply half(): 0.2s, load VAE: 0.3s, load textual inversion embeddings: 0.5s, calculate empty prompt: 1.2s).
ERROR:asyncio:Exception in callback H11Protocol.timeout_keep_alive_handler()
handle: <TimerHandle when=1351.671 H11Protocol.timeout_keep_alive_handler()>
Traceback (most recent call last):
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 249, in _fire_event_triggered_transitions
    new_state = EVENT_TRIGGERED_TRANSITIONS[role][state][event_type]
KeyError: <class 'h11._events.ConnectionClosed'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\itech\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 363, in timeout_keep_alive_handler
    self.conn.send(event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 468, in send
    data_list = self.send_with_data_passthrough(event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 493, in send_with_data_passthrough
    self._process_event(self.our_role, event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 242, in _process_event
    self._cstate.process_event(role, type(event), server_switch_event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 238, in process_event
    self._fire_event_triggered_transitions(role, event_type)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 251, in _fire_event_triggered_transitions
    raise LocalProtocolError(
h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE
ERROR:asyncio:Exception in callback H11Protocol.timeout_keep_alive_handler()
handle: <TimerHandle when=1351.718 H11Protocol.timeout_keep_alive_handler()>
Traceback (most recent call last):
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 249, in _fire_event_triggered_transitions
    new_state = EVENT_TRIGGERED_TRANSITIONS[role][state][event_type]
KeyError: <class 'h11._events.ConnectionClosed'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\itech\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 363, in timeout_keep_alive_handler
    self.conn.send(event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 468, in send
    data_list = self.send_with_data_passthrough(event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 493, in send_with_data_passthrough
    self._process_event(self.our_role, event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 242, in _process_event
    self._cstate.process_event(role, type(event), server_switch_event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 238, in process_event
    self._fire_event_triggered_transitions(role, event_type)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 251, in _fire_event_triggered_transitions
    raise LocalProtocolError(
h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE
*** API error: POST: http://127.0.0.1:7860/run/predict {'error': 'LocalProtocolError', 'detail': '', 'body': '', 'errors': "Can't send data when our state is ERROR"}
    Traceback (most recent call last):
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
        await self.app(scope, receive, _send)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 109, in __call__
        await response(scope, receive, send)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 270, in __call__
        async with anyio.create_task_group() as task_group:
      File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 597, in __aexit__
        raise exceptions[0]
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 273, in wrap
        await func()
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 134, in stream_response
        return await super().stream_response(send)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 255, in stream_response
        await send(
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 159, in _send
        await send(message)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 490, in send
        output = self.conn.send(event=response)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 468, in send
        data_list = self.send_with_data_passthrough(event)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 483, in send_with_data_passthrough
        raise LocalProtocolError("Can't send data when our state is ERROR")
    h11._util.LocalProtocolError: Can't send data when our state is ERROR

---
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
    await super().__call__(scope, receive, send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
    raise exc
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 109, in __call__
    await response(scope, receive, send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 270, in __call__
    async with anyio.create_task_group() as task_group:
  File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 597, in __aexit__
    raise exceptions[0]
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 273, in wrap
    await func()
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 134, in stream_response
    return await super().stream_response(send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 255, in stream_response
    await send(
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 159, in _send
    await send(message)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 490, in send
    output = self.conn.send(event=response)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 468, in send
    data_list = self.send_with_data_passthrough(event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 483, in send_with_data_passthrough
    raise LocalProtocolError("Can't send data when our state is ERROR")
h11._util.LocalProtocolError: Can't send data when our state is ERROR
*** API error: POST: http://127.0.0.1:7860/run/predict {'error': 'LocalProtocolError', 'detail': '', 'body': '', 'errors': "Can't send data when our state is ERROR"}
    Traceback (most recent call last):
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
        await self.app(scope, receive, _send)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 109, in __call__
        await response(scope, receive, send)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 270, in __call__
        async with anyio.create_task_group() as task_group:
      File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 597, in __aexit__
        raise exceptions[0]
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 273, in wrap
        await func()
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 134, in stream_response
        return await super().stream_response(send)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 255, in stream_response
        await send(
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 159, in _send
        await send(message)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 490, in send
        output = self.conn.send(event=response)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 468, in send
        data_list = self.send_with_data_passthrough(event)
      File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 483, in send_with_data_passthrough
        raise LocalProtocolError("Can't send data when our state is ERROR")
    h11._util.LocalProtocolError: Can't send data when our state is ERROR

---
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
    await super().__call__(scope, receive, send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
    raise exc
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 109, in __call__
    await response(scope, receive, send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 270, in __call__
    async with anyio.create_task_group() as task_group:
  File "C:\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 597, in __aexit__
    raise exceptions[0]
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 273, in wrap
    await func()
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 134, in stream_response
    return await super().stream_response(send)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 255, in stream_response
    await send(
  File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 159, in _send
    await send(message)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 490, in send
    output = self.conn.send(event=response)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 468, in send
    data_list = self.send_with_data_passthrough(event)
  File "C:\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 483, in send_with_data_passthrough
    raise LocalProtocolError("Can't send data when our state is ERROR")
h11._util.LocalProtocolError: Can't send data when our state is ERROR
javsezlol1 commented 11 months ago

Looks like its something to do with api will check it this week

javsezlol1 commented 11 months ago

Are you using api?

javsezlol1 commented 11 months ago

Another possible thing(just a guess) do any of your styles contain Chinese characters( or non English). Try closing the server and inside the styles extension folder edit the configs and set autoconvert to false see if that fixes it

ostap667inbox commented 11 months ago

Are you using api?

Yes. And there's a --api parameter in the start .bat file. It is required for the openOutpaint extension. After removing the --api parameter, the WebUI startup errors stopped appearing.

Another possible thing(just a guess) do any of your styles contain Chinese characters( or non English). Try closing the server and inside the styles extension folder edit the configs and set autoconvert to false see if that fixes it

My styles contain strictly only Latin characters. And I checked your assumption by completely deleting the contents from styles.csv. This way, the Stylez extension was left with only its own styles. Without custom styles, errors still appear.

javsezlol1 commented 11 months ago

i cannot replicate this issue could you give me a list of your extensions

ostap667inbox commented 11 months ago

Extension | URL | Branch | Version | Date | Update -- | -- | -- | -- | -- | -- --sd-webui-ar-plus | https://github.com/LEv145/--sd-webui-ar-plus | main | a7ac063a | 2023-07-30 14:45:00 | unknown Stable-Diffusion-Webui-Civitai-Helper | https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper.git | main | ab8cac22 | 2023-10-20 23:57:49 | unknown Stylez | https://github.com/javsezlol1/Stylez.git | main | d8d46660 | 2023-10-26 12:32:57 | unknown adetailer | https://github.com/Bing-su/adetailer.git | main | 887155c8 | 2023-10-15 11:31:17 | unknown canvas-zoom | https://github.com/richrobber2/canvas-zoom.git | main | 36762c01 | 2023-09-26 19:08:17 | unknown custom-hires-fix-for-automatic1111 | https://github.com/wcde/custom-hires-fix-for-automatic1111.git | main | 9700c14b | 2023-10-16 10:18:48 | unknown deforum-for-automatic1111-webui | https://github.com/deforum-art/deforum-for-automatic1111-webui.git | automatic1111-webui | 8dcb1394 | 2023-10-23 07:20:42 | unknown latent-upscale | https://github.com/feynlee/latent-upscale.git | main | b9f75f44 | 2023-07-18 00:55:32 | unknown multidiffusion-upscaler-for-automatic1111 | https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111.git | main | 61c8114b | 2023-10-20 14:19:34 | unknown openOutpaint-webUI-extension | https://github.com/zero01101/openOutpaint-webUI-extension | main | a4a0200f | 2023-09-01 04:12:02 | unknown sd-dynamic-prompts | https://github.com/adieyal/sd-dynamic-prompts.git | main | 39c06b30 | 2023-08-28 12:21:32 | unknown sd-dynamic-thresholding | https://github.com/mcmonkeyprojects/sd-dynamic-thresholding.git | master | a046fe9c | 2023-10-19 04:09:17 | unknown sd-webui-3d-open-pose-editor | https://github.com/nonnonstop/sd-webui-3d-open-pose-editor.git | main | f2d5aac5 | 2023-04-15 16:21:06 | unknown sd-webui-controlnet | https://github.com/Mikubill/sd-webui-controlnet.git | main | e382d161 | 2023-10-26 04:35:02 | unknown sd-webui-infinite-image-browsing | https://github.com/zanllp/sd-webui-infinite-image-browsing.git | main | add16701 | 2023-10-06 16:50:39 | unknown sd-webui-inpaint-anything | https://github.com/Uminosachi/sd-webui-inpaint-anything.git | main | a08995a7 | 2023-10-18 05:31:34 | unknown sd-webui-lobe-theme | https://github.com/canisminor1990/sd-webui-lobe-theme.git | main | 51acc6e7 | 2023-10-26 11:27:56 | unknown sd-webui-model-converter | https://github.com/Akegarasu/sd-webui-model-converter.git | main | 5007e6f3 | 2023-09-28 05:59:04 | unknown sd-webui-negpip | https://github.com/hako-mikan/sd-webui-negpip.git | main | 6ac99603 | 2023-10-18 13:16:02 | unknown sd-webui-openpose-editor | https://github.com/huchenlei/sd-webui-openpose-editor.git | main | be6f54fa | 2023-10-16 00:47:30 | unknown sd-webui-photopea-embed | https://github.com/yankooliveira/sd-webui-photopea-embed.git | main | 99ea83f9 | 2023-10-01 00:16:23 | unknown sd-webui-qrcode-toolkit | https://github.com/antfu/sd-webui-qrcode-toolkit.git | main | ed244d07 | 2023-07-20 04:53:20 | unknown sd-webui-regional-prompter | https://github.com/hako-mikan/sd-webui-regional-prompter.git | main | 89d45b03 | 2023-10-26 11:50:53 | unknown sd-webui-roop | https://github.com/s0md3v/sd-webui-roop | main | 9a16e728 | 2023-10-06 22:24:55 | unknown sd-webui-stablesr | https://github.com/pkuliyi2015/sd-webui-stablesr.git | master | 4499d796 | 2023-07-01 19:38:32 | unknown sd_shutdown_button | https://github.com/EnsignMK/sd_shutdown_button.git | main | 8ccd8931 | 2023-10-11 16:34:47 | unknown stable-diffusion-webui-model-toolkit | https://github.com/arenasys/stable-diffusion-webui-model-toolkit.git | master | cf824587 | 2023-07-27 21:24:02 | unknown stable-diffusion-webui-two-shot | https://github.com/ashen-sensored/stable-diffusion-webui-two-shot.git | main | 6b55dd52 | 2023-04-02 14:24:25 | unknown ultimate-upscale-for-automatic1111 | https://github.com/Coyote-A/ultimate-upscale-for-automatic1111.git | master | 728ffcec | 2023-09-09 13:47:23 | unknown LDSR | built-in | None |   |   |   Lora | built-in | None |   |   |   ScuNET | built-in | None |   |   |   SwinIR | built-in | None |   |   |   extra-options-section | built-in | None |   |   |   mobile | built-in | None |   |   |   prompt-bracket-checker | built-in | None |   |   |  

ostap667inbox commented 11 months ago

But if I remove all extensions except those built into A1111 and leave only Stylez - the errors remain. stylez-only If I remove only Stylez, the errors disappear. That is, in all possible combinations, errors appear only when Stylez is installed. Also, I have two independently installed different builds of A1111 (backup build in case the main build becomes inoperable after another update), I check in both of them and in both of them installing Stylez after loading WebUI causes these errors.

ostap667inbox commented 11 months ago

I updated the first post, copied the whole list of errors appearing , right after the last WebUI message that the model is loaded. It seems that all the errors were not copied before.

javsezlol1 commented 11 months ago

okay thanks its still a weird issue. im working my way through your extensions list but everything is work as expected. the issue lies in AGSI but my extension isnt using any of that so im wondering if there is requirement in one of the extensions that is causing it, and that some how conflicts with sytlez.. ill keep you updated and let you know what i find if anything

javsezlol1 commented 11 months ago

quick question are you using any other web commands?

ostap667inbox commented 11 months ago

quick question are you using any other web commands?

no, local only

javsezlol1 commented 11 months ago

just got to the end of you list and zero issue even while using --api, img going to do a fresh install and see if that will trigger it

javsezlol1 commented 11 months ago

hey im sorry but i cannot replicate this issue the issue must lie somewhere else

image

its possible you have a corrupt python package or something along those lines why specifically its happening with my plugin i dont know

i have seen this issue else where online and from what i gathered is to make sure you restart the webui after each extension install. fully close and relaunch not just restart.

sorry i cant help more with it but it seems like a user specific issue. our SD webui should be identical with doing a fresh install and and adding in all your extensions. Why specifically it affects my extension i dont know. all the errors that are listed have nothing to do with my extension. could you try installing and do a full restart and let me know if not im sorry i cant do much more.

ostap667inbox commented 11 months ago

It's probably a localized problem. Fortunately, apart from the error list output in the console it doesn't cause any other problems and I can work with WebUI. Thank you, for your attempts to help. I appreciate it.

javsezlol1 commented 11 months ago

Your welcome ! let me know if you have anything else you want feature wise or bugs wise, thanks