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

Error, no parenthesis on print #71

Open
MyUsernamee opened this issue May 6, 2022 · 4 comments
Open

Error, no parenthesis on print #71

MyUsernamee opened this issue May 6, 2022 · 4 comments

Comments

@MyUsernamee
Copy link

MyUsernamee commented May 6, 2022

After creating a conda env like specified in the readme and downloading the models, I can't run the text2im script, I get this error:

  File "scripts/txt2img.py", line 10, in <module>
    from ldm.util import instantiate_from_config
  File "/home/dihydromonoxide/.local/lib/python3.8/site-packages/ldm.py", line 77
    print os.path.exists("%s.bz2"%(predictor_path))

To do this I ran:

$ conda activate ldm # To activate it
$ mkdir -p models/ldm/text2img-large/ # To download the model
$ wget -O models/ldm/text2img-large/model.ckpt https://ommer-lab.com/files/latent-diffusion/nitro/txt2img-f8-large/model.ckpt
$ python3 scripts/txt2img.py --prompt "a virus monster is playing guitar, oil on canvas" --ddim_eta 0.0 --n_samples 4 --n_iter 4 --scale 5.0  --ddim_steps 50 # To run it

I am running the latest version of conda 4.12.0 and python 3.8.5.

Thank you for any help in advance! It is probably something simple. :(

@trufty
Copy link

trufty commented Jun 10, 2022

I assumed I was missing a python package named ldm, which was incorrect. I just needed to append a system path sys.path.append('.') so it includes the ./ldm folder scripts.

@MyUsernamee
Copy link
Author

Where did you add that?

@trufty
Copy link

trufty commented Jun 17, 2022

below import sys in the pipeline

@eformx
Copy link

eformx commented Jun 17, 2022

place it in txt2Img.py and then fix other issues like these:

in autoencoder.py by you need taming module which requires pip install taming-transformers
and then change this:
from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer
to this:
from taming.modules.vqvae.quantize import VectorQuantizer as VectorQuantizer
as VectorQuanitizer2 does not exist in quantize.py

and then it all runs.

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