justinpinkney / stable-diffusion

MIT License
1.46k stars 269 forks source link

No module named 'ldm.models' #87

Open hejh8 opened 1 year ago

hejh8 commented 1 year ago

from ldm.models.diffusion.ddim import DDIMSampler ModuleNotFoundError: No module named 'ldm.models'; 'ldm' is not a package

hdparmar commented 1 year ago

Strange, are you in the path of ldm or are you outside of the path? You must be in the stable-diffusion directory. If you are outside, then probably you need to set your PYTHONPATH to the ldm path with a environment variable.

drzraf commented 1 year ago

Same here, inside a venv. But works if doing export PYTHONPATH=$(pwd) first

drzraf commented 1 year ago

dup' of #86 and #75