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

[Bug]: Exception in ASGI application #11855

Closed
1 task done
RaannaKasturi opened this issue Jul 18, 2023 · 17 comments
Closed
1 task done

[Bug]: Exception in ASGI application #11855

RaannaKasturi opened this issue Jul 18, 2023 · 17 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@RaannaKasturi
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 289, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/gzip.py", line 24, in call
await responder(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/gzip.py", line 44, in call
await self.app(scope, receive, self.send_with_gzip)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
raise e
File "/usr/local/lib/python3.10/dist-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 273, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 192, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 271, in api_info
return gradio.blocks.get_api_info(config, serialize) # type: ignore
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 504, in get_api_info
serializer = serializing.COMPONENT_MAPPINGtype
KeyError: 'dataset'

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

Model should get change easily and images should be generated & NO BUGS

Version or Commit where the problem happens

v1.4.1

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Other/Cloud

What device are you running WebUI on?

Other GPUs

Cross attention optimization

xformers

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--share --disable-safe-unpickle --xformers --reinstall-xformers --no-half-vae --theme dark --enable-insecure-extension --gradio-queue

List of extensions

3d openpose
aspect ratio helper
batch links
civitai browser
controlnet
depth library
huggingface
image browser
lycoris
openpose_editor
posex
remove bg
tunnels
tag complete

Console logs

/content/VILID
fatal: No names found, cannot describe anything.
Python 3.10.12 (main, Jun  7 2023, 12:45:35) [GCC 9.4.0]
Version: ## 1.4.1
Commit hash: 581abaf3e0a89cbee3b28fe676a20479d99917f7
Installing xformers
Installing requirements








Launching Web UI with arguments: --share --disable-safe-unpickle --xformers --reinstall-xformers --no-half-vae --theme dark --enable-insecure-extension --gradio-queue
2023-07-18 09:14:18.464382: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2023-07-18 09:14:28,114 - ControlNet - INFO - ControlNet v1.1.232
ControlNet preprocessor location: /content/VILID/extensions/VILID-controlnet/annotator/downloads
2023-07-18 09:14:28,450 - ControlNet - INFO - ControlNet v1.1.232
Loading weights [ed989d673d] from /content/VILID/models/Stable-diffusion/Dreamshaper.safetensors
Creating model from config: /content/VILID/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
Running on local URL:  http://127.0.0.1:7860
DiffusionWrapper has 859.52 M params.
preload_extensions_git_metadata for 21 extensions took 0.76s
Running on public URL: https://56e7f5005674ca00df.gradio.live

This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces
Startup time: 32.6s (import torch: 8.7s, import gradio: 1.1s, import ldm: 1.9s, other imports: 1.7s, setup codeformer: 0.2s, load scripts: 5.6s, create ui: 2.4s, gradio launch: 10.8s).
Applying attention optimization: xformers... done.
Textual inversion embeddings loaded(24): Asian-Less-Negative, Asian-Less-Normal, Asian-Less-Toon, bad-artist, bad-artist-anime, bad-hands-5, bad-image-v2-39000, bad-picture-chill-75v, bad_pictures, bad_prompt, bad_prompt_version2, badhandv4, charturnerv2, CyberRealistic_Negative-neg, easynegative, EasyNegativeV2, HyperStylizeV6, negative_hand-neg, ng_deepnegative_v1_75t, pureerosface_v1, rmadanegative402_sd15-neg, ulzzang-6500, ulzzang-6500-v1.1, verybadimagenegative_v1.3
Textual inversion embeddings skipped(4): nartfixer, 21charturnerv2, nrealfixer, nfixer
Model loaded in 20.5s (load weights from disk: 1.6s, create model: 1.9s, apply weights to model: 14.0s, apply half(): 1.8s, move model to device: 0.9s, load textual inversion embeddings: 0.1s, calculate empty prompt: 0.2s).


ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 289, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 83, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/gzip.py", line 24, in __call__
    await responder(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.10/dist-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/usr/local/lib/python3.10/dist-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 273, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 192, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 271, in api_info
    return gradio.blocks.get_api_info(config, serialize)  # type: ignore
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 504, in get_api_info
    serializer = serializing.COMPONENT_MAPPING[type]()
KeyError: 'dataset'

Additional information

I'm working on Colab

@RaannaKasturi RaannaKasturi added the bug-report Report of a bug, yet to be confirmed label Jul 18, 2023
@RaannaKasturi RaannaKasturi changed the title [Bug]: [Bug]: Exception in ASGI application Jul 18, 2023
@Enferlain
Copy link

Same

@Vsevolod-Shustov
Copy link

Disabling depth-lib fixed it for me. Why did it break now, 3 months after the last lib update, is anyone's guess.

@Enferlain
Copy link

for me it was installing 3.33.1 gradio instead of 3.32

@RaannaKasturi
Copy link
Author

Disabling depth-lib fixed it for me. Why did it break now, 3 months after the last lib update, is anyone's guess.

It definately isn't with the extension. I've tried removing all extensions and then ran it again. It's definately related to Stable Diffusion Webui

@RaannaKasturi
Copy link
Author

for me it was installing 3.33.1 gradio instead of 3.32

Did it. I've also upgraded all the libraries & extensions to the latest version. Didn't worked out, either

@Enferlain
Copy link

Enferlain commented Jul 18, 2023 via email

@slowargo
Copy link

pip install gradio_client==0.2.7 works for me

@RaannaKasturi
Copy link
Author

RaannaKasturi commented Jul 19, 2023

Got it solved out. It's due to the latest update in sd-webui-depth-lib Extension. Uninstalling it or Going back to commit 28a2238 solved it.

@miaoshouai
Copy link

had the same problem when updated to 1.5RC. switch gradio_client back to 0.2.7 solve the problem
pip install gradio_client==0.2.7

@jpdiazpardo
Copy link

pip install gradio_client==0.2.7 works for me

God bless you, it worked!!

@jtydhr88
Copy link

jtydhr88 commented Aug 7, 2023

if you don't want to reinstall gradio client, you can check jexom/sd-webui-depth-lib#36

@RaannaKasturi
Copy link
Author

if you don't want to reinstall gradio client, you can check jexom/sd-webui-depth-lib#36

Thankyou. It worked 👍

@tolongascrazy
Copy link

if you don't want to reinstall gradio client, you can check jexom/sd-webui-depth-lib#36

Thank you, It worked

@JoejoeC
Copy link

JoejoeC commented Sep 18, 2023

My situation is that after installing depth-lib, an error was reported. I just deleted the depth-lib extension and it's fine

@RaannaKasturi
Copy link
Author

My situation is that after installing depth-lib, an error was reported. I just deleted the depth-lib extension and it's fine

There's an issue with the depth-lib repo. Do not install it or if already installed, delete the repo before running the SD WebUI.

@Winters-Glade
Copy link

TLDR:
The problem for me was miaoshouai-assistant. Removed it, deleted venv folder. Works now.

Longer version:
I had tried everything I found on this page and a few others with no luck.
I can't say whether or not anything on this page helped my solution mentioned here work better or if there was no effect. All I know is the fixes didn't work until I removed the miaoshouai-assistant extension. I really liked that extension and hope it's updated to working again for me.

Steps I performed to get my stable diffusion working again:

  • Delete the venv folder
  • Delete the Miaoshouai-assistant folder in /extensions
  • Run webui-user.bat

The venv folder was rebuilt and started working. The reason I take extra care to point this out is because I tried running SD with no extensions in the /extensions folder and still got the same error. I can only guess that miaoshouai-assistant puts something in the folder that causes the issue, or requires a dependency that causes the issue.

Hope this helps ♥

@arex4646
Copy link

助けてください
17時間やってますがエラーが起きてしまって困ってます
キャプチャ
キャプチャ PNG 1
こちらです
調べてやってみたのですがダメでした
再インストールも試しましたがやはりだめでした

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests