ImportError: cannot import name 'StableDiffusionPipeline' from 'diffusers'

ImportError : Traceback (most recent call last) Input In [96],

in <cell line: 3>()

1 import torch

2 from torch import autocast

----> 3 from diffusers import StableDiffusionPipeline

ImportError: cannot import name 'StableDiffusionPipeline' from 'diffusers' (E:\Py\env\lib\site-packages\diffusers_init_.py)

i've installed diffusers latest version. how do i solve this?

1

2 Answers

Reinstalling diffusers solves the problem for me.

pip uninstall diffusers
pip install diffusers
1

Updated April 2023: There are some version conflict problems that's why you cannot run StableDiffusionPipeline. I also tried pip install --upgrade diffusers[torch] and conda install -c conda-forge diffusers but didn't work for me Double check the diffuser version.

Solution

git clone
cd lambda-diffusers
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install diffusers==0.11.1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like