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" #160

Closed
Nughu opened this issue Sep 1, 2022 · 2 comments
Closed

ModuleNotFoundError: no module named "ldm" #160

Nughu opened this issue Sep 1, 2022 · 2 comments

Comments

@Nughu
Copy link

Nughu commented Sep 1, 2022

I generated the conda environment using environment.yaml, and activated it in my docker console. When I try to run txt2img.py, I get the

ModuleNotFoundError: no module named "ldm".

According to the tutorial I followed, this capability should have been set up by creating the conda env. What am I missing?
IMG_20220901_190922

@naturalethic
Copy link

While txt2img worked fine for me, img2img was presenting this error when running. The fix is to insert this line somewhere above the ldm import:

sys.path.append(os.path.join(os.path.dirname(__file__), ".."))

@Nughu
Copy link
Author

Nughu commented Sep 1, 2022

@naturalethic thank you so much, this solved it!

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

2 participants