pesser/stable-diffusion

ModuleNotFoundError: No module named 'ldm'

pauljakobcarroll opened this issue · 2 comments

After following the directions, the txt2img.py script itself doesn't seem to recognize the LDM we created with the .yaml, though it exists in the .\anaconda3\envs. Do I perhaps have the wrong version of python or something? (I'm using 3.10) I don't see anything specified.

txt2img.py", line 15, in <module>
    from ldm.util import instantiate_from_config
ModuleNotFoundError: No module named 'ldm'

Also I found manually running 'pip install ldm' would install the wrong package, then it will ask for ldm.utils if I go this route. ref: CompVis/latent-diffusion#71 but this looks like it was using an online notebook

I fixed this by using sys.path.append(<my path to stable-diffusion parent directory>) before the ldm imports
And then with python ran scripts/txt2img.py from the parent directory

@kisenera is right. This issue can be closed.
Another name instead of "ldm" is preferred still.