deforum / stable-diffusion

Other
793 stars 159 forks source link

AttributeError: module 'k_diffusion' has no attribute 'external' #107

Closed Limbicnation closed 2 years ago

Limbicnation commented 2 years ago

After running python stable-diffusion-webui/webui.py I get the following error: AttributeError: module 'k_diffusion' has no attribute 'external' I did git pull and pip install -r requirements_versions.txt --prefer-binary as well as
pip install git+https://github.com/crowsonkb/k-diffusion/

nousr commented 2 years ago

can you do a "which python" and "which pip" to find the path to your default python and pip paths, and "pip list" as well to verify that the same python you installed the library into is the one you are running the code with?

Limbicnation commented 2 years ago

Hi thanks for the fast response! Yes following outputs are given: "which python": /home/*****/anaconda3/envs/stable-diffusion/bin/python "which pip": /home/*****/anaconda3/envs/stable-diffusion/bin/pip I might need to reinstall stable-diffusion then.

nousr commented 2 years ago

if you do "pip list" do you see k-diffusion in the list?

Limbicnation commented 2 years ago

Yes I see it: k-diffusion 0.0.9

nousr commented 2 years ago

Yes I see it:

`k-diffusion 0.0.9

`

i'm assuming you're trying to run the jupyter notebook locally here, correct?

if so you should run all of the above commands inside a jupyter cell.

you can do so by prepending a "!" to any bash commands.

example: "!which pip"


if you do this and see different results than you see when running these commands from the terminal you need to specify the python interpreter path at the top of the notebook.

https://stackoverflow.com/questions/3108285/in-python-script-how-do-i-set-pythonpath

Limbicnation commented 2 years ago

Hi sorry for my late reply. I am running the code locally from python. Basically I did get everything to work, after running this scrip within my dsd virtual environment.

python Deforum_Stable_Diffusion.py

and to let the installer do the rest. Thanks!