WARNING | Unrecognized alias: 'setup', it will have no effect.
T0bycat opened this issue ยท 23 comments
Yeah, I can't even get this running too.
Hi, I pushed a fix for this. The problem was that argparse is incompatible with ipython. Now you can simply run ipython3 diffuse.py
without the setup
flag and it should work to download all the repositories.
Let me know if it works!
Hi, you should not install the package ldm from pip.. Ldm is a package in the "latent-diffusion" repository - which should be cloned correctly when using the newest version with ipython3 diffuse.py. So if you installed ldm then uninstall it again using pip and then run the setup.
It still gives me that original No module named 'ldm'
error...
I changed the import order. Try again, please :)
So it definitely did get farther this time! But it did end up still erroring out.
my terminal (too much to put in an issue comment)
Hi! Pretty new to running stuff like this, I downloaded your latest build and ran ipython3 diffuse.py and I get the same DDIMsampler issue.
Any prerequisites to running this or anything I'm doing wrong? Like I said, total newbie :D - I installed python 3.9 (since I read that's that pytorch can use) , installed git and just ran ipython3 diffuse.py in windows powershell.
Thanks for sharing this btw, super excited to try it out.
(sorry T0bycat just realized I kinda hijacked your thread in the end there)
Okay it seems like you do not have the einops
package. I think it should also exist for python3.9. For your future python endeavors, if you encounter problems like these you can google the package and check if it's available through pypi. Then you can just install it with python3 -m pip install PACKAGE_NAME
. You don't need to to so now because I added it in the script.
I moved the pip installs to an earlier point in the script. Pull and try it again.
doh! thanks for the tips and for making this - I got it working! :)
Hey, I just pulled the latest but I'm also running into that same issue. When I attempt to manually install the "einops" package, it says it's already satisfied:
@totallyfromearth what's the secret? lol
=====
Edit: I've been trying for the past 6 hours. I desperately want this to work, but it just doesn't want to. I've tried from both Powershell and also using Anaconda, and I get the same errors each time.
I gave up and started a completely new environment in anaconda using Python 3.9 and tried again, still fails. I went so far as to manually install all the packages that it would throw errors on (pandas, timm, requests, matplotlib, ipywidgets, pytorch-lightning, omegaconf, etc...). The furthest it got was line 149 in diffuse.py, print('Using device:', device) which returns CUDA:0, then it throws a bunch of SSL connection errors, ending with:
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)>
If I'm missing something, please let me know what I'm doing wrong.
====
EDIT 2: I got it to work. I was able to get around the SSL errors by adding this to the top of diffuse.py:
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
I'm not sure what the root cause of the certificate issue is, though, so this is basically just a work-around. Also not sure why the other packages didn't install on setup and needed to be installed manually. For anyone else that runs into this issue and just wants to brute-force the install, here's what I had to do (on Windows):
- Install Anaconda
- Create and activate a new environment (don't use base)
- Install pytorch via their web code, using pip (not conda)
- Install iPython
- Add the forge channel to anaconda
conda config --add channels conda-forge
- Install dependency packages using conda (for those available), otherwise use pip. The ones I had issues with were: OpenCV, pandas, timm, lpips, requests, pytorch-lightning, and omegaconf. There might be one or two others.
- Run ipython diffuse.py
- If it goes all the way, congrats. If you hit the SSL errors, open diffuse.py and add:
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
to the top (I did it around line 7.) - If you get Frame Prompt: [''] and a failed output, make sure you're using python3 to run diffuse.py and not iPython :)
- If you get a CUDA out of memory warning, pass a lower res like
--width 720 --height 480
when you run.
Hey @Jotunblood
Apologies for the late reply, could have saved you some time! I had to use the import ssl trick as well, glad you got it working!
Awesome that you got it working! @Jotunblood I will put your instruction in the README for now.
Thank you NotNANtoN! This is a whole new world to me and I am diving head first into it all.
After reviewing all the notes and updated steps, I am super pumped to have it working! Thanks to everyone on this thread as well. I do have one question pertaining to the resolution settings. I had the default resolution settings set up, however that it auto resizes the image(s).
When I increase the resolution to something like 1280 x 768, I get an error:
How can I get a larger output resolution? I have a RTX 2080 Super and wasn't sure if I am missing a step to fully utilize the hardware. Appreciate any help and again thanks to everyone on this thread, it has been extremely helpful!!
@3DTC Interesting that it resized from default. That was the res I was getting auto-resized to when I tried 720x480 (I now use 768x512). I can't run default settings on 3060 ti, I just get failed memory allocation errors. Quick glance shows me that 2080 super has 8GB VRAM, so you might be in the same boat as me. I haven't tried to go any higher with my res since I just enlarge them after the render.
Thanks for the quick reply @Jotunblood. I will try and increase to 768x512 and see if I can get it a little higher. Cheers!
@3DTC No problem. I just ran a test at 896x512 and it failed.
The highest I can run is 832x512, or 896x448. Both of those work for me.
Thanks for research into possible input resolutions for 8GB! I will put them in the README
Hello! I still can't seem to get past the error T0bycat had - the No module named 'ldm' error.
I followed the Windows guide step by step so I'm not really sure how to proceed. Any help would be appreciated. Thanks!
@FrostyDeluxe Sorry to hear! In the "Install dependency packages" step, there might be other packages that also need to be installed, such as "ldm" and "einops", and maybe a few others. If so, just follow the same install process as the other modules and install those via conda if available, or pip if not.
@Jotunblood Ok, I got it working. I had to install git.
No such Luck, I get Major issues regarding Descriptors not being able to be created successfully. I got every dependency working and installed, but it doesn't matter.