Open KarmaMole opened 1 year ago
I had same issue. Couldn't get it to work until I ran the pip install from the python console in visual studio code. Some wrong path wrong environment mixup, but you'd think pip would put it in the right one. anyway try to figure out your environments.
Update: I tried pip installs of flusk and transformers, but on sd-API Server start I' am getting the following import error:
ImportError: cannot import name 'SAFE_WEIGHTS_NAME' from 'transformers.utils' (C:\Users\sa\anaconda3\envs\sd-api-server\lib\site-packages\transformers\utils__init__.py)
-- Same flask ModuleNotFoundError.
is there already so solution how to fix in order to start the sd-API-server correctly ?
which concrete pip-install could help ?
for me helps: pip install flask pip install diffusors pip install transfomers
then python server.py works (from 2nd time, first time pytorch_model.bin only download 72%)
I'm having the same issue with ModuleNotFoundError: No module named 'flask' I tried everything mentioned here, no luck. I also spent an hour feeding ChatGPT error messages, but is has no clue what to do and started going in circles.
I am a Photoshop user trying to use a plugin, figuring out what has gone wrong here is above my skill level.
I think there is some problem with paths/environments, feels like there are somehow mutiple Python installations, each one with it's own 'extras' installed or something, in any case my Python is hella confused about Flask because I have installed it a million times but it still cannot find it when I try to run the server. When I want to uninstall it, it is right there though.
I give up on ever getting this to work.
If I try to start the server with python3 server.py as instructed, I get:
Traceback (most recent call last): File "C:\Stable Diffusion Engines\stable-diffusion-api-server-main\server.py", line 5, in
import flask
ModuleNotFoundError: No module named 'flask'
I've also tried pip install flask, but it just says 'requirements fullfilled'.
And if I try to start it with just python server.py, I get: ImportError: cannot import name 'SAFE_WEIGHTS_NAME' from 'transformers.utils' (C:\Users\Omar.conda\envs\sd-api-server\lib\site-packages\transformers\utils__init__.py)
I've followed all the instructions exactly as specified.