acheong08 / Diffusion-ColabUI

Choose your diffusion models and spin up a WebUI on Colab in one click
Apache License 2.0
421 stars 62 forks source link

Latest bug #91

Closed Enferlain closed 1 year ago

Enferlain commented 1 year ago

Can you fix this? Or any manual workaround until it's fixed?

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7714

Traceback (most recent call last): File "launch.py", line 361, in start() File "launch.py", line 356, in start webui.webui() File "/content/stable-diffusion-webui/webui.py", line 232, in webui app.add_middleware(GZipMiddleware, minimum_size=1000) File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 135, in add_middleware raise RuntimeError("Cannot add middleware after an application has started") RuntimeError: Cannot add middleware after an application has started ^C

acheong08 commented 1 year ago

Check if fixed https://github.com/acheong08/stable-diffusion-webui/commit/48e76521d0b5112b95861686536c611c73262075

GoAwayNow commented 1 year ago

Woah, actually, not fixed. For some reason, requirements_versions.txt is being totally ignored for me! When I tested, just about everything in the file is installed as the wrong version.

EDIT: Yeah, requirements_versions.txt is being ignored. I had to replace the line in requirements.txt with sed.

!sed -i 's/fastapi/fastapi==0.90.1/' requirements.txt

qa13683954882 commented 1 year ago

Replace the original REQS_FILE="requirements.txt" ๐Ÿ‘ˆ๐Ÿ‘‰ REQS_FILE="requirements_versions.txt"

Fix this problem ๏ผšCannot add middleware after an application has started

The fundamental reason is the 0.91 version of Fastapi.

Fastapi 0.90.1 0.90 0.89 is ok.

GoAwayNow commented 1 year ago

Replace the original REQS_FILE="requirements.txt" ๐Ÿ‘ˆ๐Ÿ‘‰ REQS_FILE="requirements_versions.txt"

Don't do that. Requirements_versions.txt doesn't have all of the requirements in it.

acheong08 commented 1 year ago

Solution is to put fastapi version in both. I'll do that

acheong08 commented 1 year ago

https://github.com/acheong08/stable-diffusion-webui/commit/44de47784af1fb12cb1cb17b8ea0a983d4ece977