-
Notifications
You must be signed in to change notification settings - Fork 85
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
RuntimeError: Cannot add middleware after an application has started #42
Comments
I have the same errors. When 2023/02/08, the code run almost well, with auto1111 master branch and SD1.5 model, only SD2.1 512 model did not work. But when 02/10, it reported errors, and totally did not work. I reinstalled the colab environment multiple times, and no auto1111 extension installed. First, it reported that it can not find SD1.5 model in safetensors formate, I redownload the ckpt model. Then, it reported middleware errors as the logs below. I tried to unselect the "apply_lowram_patch", but still not work. I tried "git checkout ea9bd9f", which is working commit last time I run, but still not work. logs: `/content/stable-diffusion-webui
The following values were not passed to This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces |
After reading this post : https://www.reddit.com/r/StableDiffusion/comments/10yurxl/help_with_error_please/ I changed codes in "Setup environment" cell, added "fastapi==0.90.1":
It works. |
Dreambooth and training is completely broken even with fastapi==0.90.1 settting |
Issue:
At Run Script step, the following error occurs:
Running on local URL: http://127.0.0.1:7860/
Running on public URL: https://c52af886-9da1-47f6.gradio.live/
This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces
Traceback (most recent call last):
File "/content/stable-diffusion-webui/launch.py", line 361, in
start()
File "/content/stable-diffusion-webui/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 "/opt/conda/lib/python3.10/site-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
Killing tunnel 127.0.0.1:7860 <> https://c52af886-9da1-47f6.gradio.live/
Traceback (most recent call last):
File "/opt/conda/bin/accelerate", line 8, in
sys.exit(main())
File "/opt/conda/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/opt/conda/lib/python3.10/site-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/opt/conda/lib/python3.10/site-packages/accelerate/commands/launch.py", line 354, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/opt/conda/bin/python', 'launch.py']' returned non-zero exit status 1.
Apparently this is fixed by adding to python script:
-m pip install --upgrade fastapi==0.90.1
but thats beyond me hence why I used a colab.
More details of other users with same error here:
https://www.reddit.com/r/StableDiffusion/comments/10yurxl/help_with_error_please/
The text was updated successfully, but these errors were encountered: