Running stable diffusion gives No module named 'ldm.util' error

1.3k views Asked by At

I am trying to run Stable Diffusion with the following command

python3 scripts/txt2img.py --prompt "red velvet cake" --plms

I get the following error:

No module named 'ldm.util'; 'ldm' is not a package

I tried multiple solutions such as running the command pip install -e . But, it didn't work

1

There are 1 answers

3
Abolfazl Ghaemi On

There can be a few potential issues :

  1. Avoid Environment Name ldm

  2. Set Up the Conda Environment

    conda env create -f environment.yaml conda activate ldm

  3. Install Project Dependencies: In your project's root folder, run: pip install -e .

  4. if you installed ldm using pip install ldm uninstall it