Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'ldm' #18

Open
pauljakobcarroll opened this issue Aug 16, 2022 · 2 comments
Open

ModuleNotFoundError: No module named 'ldm' #18

pauljakobcarroll opened this issue Aug 16, 2022 · 2 comments

Comments

@pauljakobcarroll
Copy link

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

@kisenera
Copy link

kisenera commented Aug 22, 2022

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

@songyongshun
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants