InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: macOS: ModuleNotFoundError: No module named 'ldm'

Open jaycer opened this issue 2 years ago • 8 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

macOS

GPU

mps

VRAM

No response

What happened?

New install, I get error ModuleNotFoundError: No module named 'ldm' when running % python3 scripts/invoke.py --web

InvokeAI/invokeAI/scripts/invoke.py", line 3, in import ldm.invoke.CLI ModuleNotFoundError: No module named 'ldm'

I did try % pip install -e . but that gives me these errors

ERROR: Could not find a version that satisfies the requirement clipseg (from invokeai) (from versions: none) ERROR: No matching distribution found for clipseg

Screenshots

No response

Additional context

No response

Contact Details

No response

jaycer avatar Dec 05 '22 04:12 jaycer

run ./invoke.sh from main invokeAI folder and choose 2:

PL 21:26 ~/invokeAI $ ./invoke.sh
Do you want to generate images using the
1. command-line
2. browser-based UI
3. open the developer console
Please enter 1, 2, or 3: 2

petrasl1976 avatar Dec 06 '22 20:12 petrasl1976

On the macOS, I solve the problem by the following command

pip install git+https://github.com/openai/CLIP.git@main#egg=clip
pip install git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
pip install git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
pip install git+https://github.com/invoke-ai/[email protected]#egg=gfpgan
pip install git+https://github.com/invoke-ai/[email protected]#egg=pypatchmatch
pip install -e .

tangtang666 avatar Dec 07 '22 09:12 tangtang666

I have the same problem on Ubuntu 22.04, and the above didn't help.

realenuf avatar Dec 07 '22 12:12 realenuf

On the macOS, I solve the problem by the following command

pip install git+https://github.com/openai/CLIP.git@main#egg=clip
pip install git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
pip install git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
pip install git+https://github.com/invoke-ai/[email protected]#egg=gfpgan
pip install git+https://github.com/invoke-ai/[email protected]#egg=pypatchmatch
pip install -e .

I tried this in Ubuntu 22.04 and all it did is download another 6 or 7 gigs of something and didn't help

tjthejuggler avatar Dec 08 '22 04:12 tjthejuggler

i had the same issue , and the fix was to run "conda activate invokeai" before running python scripts/invoke.py . hope this helps :)

korrasam avatar Dec 08 '22 07:12 korrasam

On the macOS, I solve the problem by the following command

pip install git+https://github.com/openai/CLIP.git@main#egg=clip
pip install git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
pip install git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
pip install git+https://github.com/invoke-ai/[email protected]#egg=gfpgan
pip install git+https://github.com/invoke-ai/[email protected]#egg=pypatchmatch
pip install -e .

I tried this in Ubuntu 22.04 and all it did is download another 6 or 7 gigs of something and didn't help

I can run successfully in Ubuntu 16.04. In fact, the problem is that the dependency package is not installed properly, which has little to do with the system. Try the following command.

conda activate invokeai
conda env update -f environment.yml

tangtang666 avatar Dec 08 '22 08:12 tangtang666

Thanks, this conda advice got be further down the road, however now it is crashing with just 'Killed' when loading the 1.5 model, I made a separate issue for it though https://github.com/invoke-ai/InvokeAI/issues/1858

tjthejuggler avatar Dec 08 '22 10:12 tjthejuggler

Same here! I now have the Conda invokeai instance, but running invoke.sh "terminates" when loading the 1.5 model. I'll jump over to your separate issue.

realenuf avatar Dec 08 '22 10:12 realenuf

I have the same issue trying in Linux. I'm using pip install and for configuring ran scripts/invoke.py and get the error: ModuleNotFoundError: No module named 'ldm'

Running ./invoke.sh didn't work for me. From reading other issues, this Idm module issue seems to occur in other steps too. Any updates on this issue?

sooolee avatar Feb 02 '23 10:02 sooolee