justinpinkney / stable-diffusion

MIT License
1.45k stars 266 forks source link

pip installed ldm #86

Open gitihobo opened 1 year ago

gitihobo commented 1 year ago

line 11, in from ldm.models.diffusion.ddim import DDIMSampler line 20 print self.face_rec_model_path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

normantaipei commented 1 year ago

I meet the same problem in python 3, did anyone solve it ?

NormanCorma commented 1 year ago

Try pip uninstall ldm pip install diffusers==0.3.0 pip install transformers scipy ftfy pip install omegaconf pip install -e .

gitihobo commented 1 year ago

nope. asks for ldm module, then No module named 'einops' ldm.py", line 20 print self.face_rec_model_path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

impiyush commented 1 year ago

so actually its trying to load the ldm from within the same repo.

I also ran into this same problem, installed the latest ldm package via pip and then realized what the code was trying to do.

To resolve this, just append the path to your root dir. Add this code to the top of the gradio_image_mixer.py file

import sys
sys.path.append("~/stable-diffusion")