No Module Named 'diffusers' in Gradio App
I'm trying to run the Gradio app locally on my Ubuntu 20.04 machine. I setup a virtual env on Python3.11 and installed all the pip packages from requirements.txt. I also followed the README for running the Gradio app and downloaded the necessary pip packages. However, I keep getting the error:
Traceback (most recent call last):
File "/home/StableCascade/gradio_app/app.py", line 3, in <module>
from diffusers import StableCascadeDecoderPipeline, StableCascadePriorPipeline
ModuleNotFoundError: No module named 'diffusers'
When I run pip freeze | grep diffusers however, the package is shown as installed:
diffusers @ git+https://github.com/huggingface/diffusers@7081a256183a123078b976223ee5409e6e19f1ec
I'm not really understanding what's going on here. Why is it not properly importing the diffusers pip package? I also tried installing diffusers via pip install git+https://github.com/kashif/diffusers.git@a3dc21385b7386beb3dab3a9845962ede6765887 --force per this issue #58, but that also yields the same error.
Would really appreciate if someone could help me resolve this issue. Thanks!
I ignore what causes the bug, but
pip uninstall diffusers
and then running
pip install git+https://github.com/kashif/diffusers.git@a3dc21385b7386beb3dab3a9845962ede6765887 --force
worked for me
Yeah I tried that exact line out, but the import still doesn't work for some reason. Do I have to do something different if I'm running it inside a Python virtual env?
Im on a conda env with python 3.10 on a windows 10, that shouldnt make the difference, but making sure you dont have conflicting paths and your default env doesnt conflict might help. I cant say 100% sure. The pip uninstall did it for me. Hope it helps.
I had a similar "No module named 'diffusers'" issue on Windows 10. So I tried to run it through Miniconda. It issued a warning during installation that the Python310\Scripts folder was not added to the PATH system variable. After adding it, everything worked.
for who cant make it run i have amazing app self developed with amazing improvements
check it out : https://github.com/Stability-AI/StableCascade/issues/125