-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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]: fastapi 0.91 app.add_middleware #7714
Comments
can confirm. i just installed webui two times and that happens too. Mine on windows
|
I am having the same issue as the above
|
Happens as well on the colab version Loading weights [eb172d270d] from /content/drive/MyDrive/AI/models/HassanBlend.ckpt This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces |
I'm having the same problem. |
downgrade fastapi to version 0.89.1 should solve the issue |
Is there a "guide" for how to do that on Windows? |
0.90 is working tools and this is how u downgrade: https://stackoverflow.com/questions/5226311/installing-specific-package-version-with-pip#5226504 |
pip install fastapi==0.90 or 0.89.1 didn't help for me. |
you can try with --upgrade flag. |
my bad version 0.90. doesn’t exist. It would be 0.90.1 |
Broken for me on Windows and Ubuntu. How to fix:
|
it's this change: |
It helps me to fix. thanks |
What to do when one doesn't even have /bin/ yet if I might ask? |
|
For Windows I started a terminal in my stable diffusion folder and ran
That solved my problem |
soo is it |
Start your environment first to get everything where it needs to be: |
Either or should work I believe, but I had success with |
Downgrading to 0.90.0 or 0.90.1 or 0.89.0 did not do the trick for me i am receiveing the same error. |
@mews-se thanks - that worked great for me (Windows 11), |
the colab line didn't work for me I guess that it happens because all the environment configuration ends inside a .tar.zst file but I don't know. I'm totally noob on this |
I had a similar issue. I've no idea if this is useful for anyone, just putting this out here: I have 2 users on Linux Mint 20.3. User 1 installed it fine, no problem. But User 2 install script fail right after starting the server, and quits with the error message:
Both users installed it correctly afaik (pre-requisites etc). Simply deleting the stable-diffusion-webui folder and re-install resulted in the same error. I resorted to simply copy the install folder from user 1 and overwrite into user 2's install, and take ownership of the files. Apparently not everything got installed the for User 2, I've no idea why. |
I am running in paperspace, what should I do? |
@gihepa988 requirements_versions.txt doesn't seem reliable. Replacing in requirements.txt works for me instead.
|
I solved it just go to requirement_version.txt and paste this "fastapi==0.90.1" |
@jameslanman I'm using a notebook I wrote myself from bits and pieces of other notebooks, I don't have a "requirements cell" - just git cloning this repo, copying models/VAE files from various places, and copying my "saved" config.json and ui-config.json back into the Colab. I see a bunch of other packages in your error that I don't recognize - onnx, etc. I just added:
And then some code from TheLastBen's colab notebook to copy blocks.py and activate local tunnel if I choose to use it and do some edits relating to that. Then launch.py runs. You need to ask whoever wrote the notebook. |
Unfortunately Dreambooth extension seems to be broken using fastapi==0.90.1, anybody else experiencing this? Log: |
go to your stable diffusion folder, you should see a file named webui.py, now edit the file with notepad. after opening it press ctrl+f (find) '' app.add_middleware(GZipMiddleware, minimum_size=1000) '' now cut the line and paste it above '' def webui(): '' keep a line space and then save the file. This should fix the error :) |
Down Grading Fastapi does the trick. pip install fastapi==0.89.1 |
how to i activate SD environment (i am a newbie regarding programming terminologies). I don't know what to do once i open SD folder |
@INFCreator for windows: #7749 (reply in thread) |
@vt-idiot Thank you! I appreciate the extra bit of advice. Time to get my hands dirty. |
@jameslanman I don't think you need it anymore after the most recent commit? |
I am not programmer. I dont undestand what i must to do. |
in COLAB |
thanks, install this version to make my code run normally pip install fastapi==0.90.0 |
System: WIN 10 ❌ Wrong operation (Install dependencies directly):
✅Correct operation:
https://www.reddit.com/r/StableDiffusion/comments/10yurxl/comment/j803rbq/ |
It doesn't. |
Make sure you do it while in the proper environment |
Sometimes when I start the webui it upgrades fastapi to 0.94.0, which doesn't work, and fails to start the server. Why does the |
i got this error after switching back to master none of this worked. i am now did checkout a9eab23 and it works again, but i would like to upgrade at some point.. |
If you are doing the pip installs and it's not working, you might have |
i get this problem even without any extensions |
I had everything working fine, I recently upgraded some modules, and it seems SD just auto upgraded fastapi.. and since I had seen the related error before, I knew what was wrong. Here are my steps on Windows 11, Python 3.10
|
trying this on windows but im having the same code over and over, can you help me resolve this issue?
|
I am running AbdBarho's Docker version, and attempting (as should be clear) to use the CPU version of Automatic's UI. I do not seem to have the webui.py file, as I can't find it (or /stable-diffusion-webui/, for that matter), so now I'm unsure of what to do. At this point the line to use has been made quite clear, but for the life of me I can't seem to find where to put it. As some others have indicated, I'm also a noob here, the vast majority of this I don't really understand. |
Is there an existing issue for this?
What happened?
I tried to run the project. It failed to attach the middleware in 'webui.py' line 232, because the server was already running. I downgraded fastapi to 0.90 and it works fine.
Steps to reproduce the problem
What should have happened?
The the should have started
Commit where the problem happens
ea9bd9f
What platforms do you use to access the UI ?
Linux
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
List of extensions
No
Console logs
Additional information
Fastapi version causes problem
no changes to project
using arch
The text was updated successfully, but these errors were encountered: