deep-daze icon indicating copy to clipboard operation
deep-daze copied to clipboard

Cuda errors

Open Burg3red opened this issue 3 years ago • 11 comments

Hey, I'm trying to set up deep daze and or Big sleep on my computer to create some art and I have almost no coding experience especially surrounding python. I am able to install Big Sleep and Deep daze on my anaconda environment however I get Cuda errors every time I try to use the imagine or dream commands. I would really appreciate some help troubleshooting.

Burg3red avatar Mar 15 '21 17:03 Burg3red

I am also getting CUDA errors.

maxcan7 avatar Mar 18 '21 13:03 maxcan7

In the google colab notebook they address this, but I haven't yet accounted for this locally.

Restart after running this cell!

You must run this cell and then restart and rerun everything for the PyTorch version to be correct. Otherwise the model will run but not produce any meaningful output.

import subprocess

CUDA_version = [s for s in subprocess.check_output(["nvcc", "--version"]).decode("UTF-8").split(", ") if s.startswith("release")][0].split(" ")[-1]
print("CUDA version:", CUDA_version)

if CUDA_version == "10.0":
    torch_version_suffix = "+cu100"
elif CUDA_version == "10.1":
    torch_version_suffix = "+cu101"
elif CUDA_version == "10.2":
    torch_version_suffix = ""
else:
    torch_version_suffix = "+cu110"

! pip install torch==1.7.1{torch_version_suffix} torchvision==0.8.2{torch_version_suffix} -f https://download.pytorch.org/whl/torch_stable.html ftfy regex

maxcan7 avatar Mar 18 '21 13:03 maxcan7

If it's a CPU/GPU/hardware thing, I may need to pull out my Jetson for this 0.o. Was hoping to play around with this before work but I guess I'll have to do it later.

maxcan7 avatar Mar 18 '21 13:03 maxcan7

This will require that you have an Nvidia GPU

I should really read the documentation more carefully haha

maxcan7 avatar Mar 18 '21 13:03 maxcan7

Yeah for me installing the newest version of torch worked for me, Imagine now works but I also have big sleep installed and dream gives me Cuda memory errors which I'm not sure how to fix because I've already got 8 GB of v ram.

Burg3red avatar Mar 18 '21 16:03 Burg3red

Also, do you know how to get these to be higher quality images than 500x500 or is that the only size it renders in?

Burg3red avatar Mar 18 '21 16:03 Burg3red

Yeah for me installing the newest version of torch worked for me, Imagine now works but I also have big sleep installed and dream gives me Cuda memory errors which I'm not sure how to fix because I've already got 8 GB of v ram.

For my own clarity, you mean you're on a machine that has a GPU, but still needed to do that?

Also, do you know how to get these to be higher quality images than 500x500 or is that the only size it renders in?

Have not had a chance to investigate yet, but if you figure it out let me know.

Anyway, so this "issue" can be closed then?

maxcan7 avatar Mar 18 '21 16:03 maxcan7

CUDA isn't available on MacOS after Intel 10.13. I'm having the same problem and am thinking DeepDaze just isn't mac compatible :( I would love to know a way around this though.

benstuart0 avatar Mar 21 '21 22:03 benstuart0

If it's a CPU/GPU/hardware thing, I may need to pull out my Jetson for this 0.o. Was hoping to play around with this before work but I guess I'll have to do it later.

Tested with a Jetson nano 2GB and it gives the same error

staberas avatar Mar 29 '21 18:03 staberas

Tested with a Jetson nano 2GB and it gives the same error

Dang I still haven't gotten around to trying this out for myself but that's disappointing to hear. Hopefully, it's just something that requires some finagling and not a hardware incompatibility thing :(...

maxcan7 avatar Mar 29 '21 18:03 maxcan7

Dang I still haven't gotten around to trying this out for myself but that's disappointing to hear. Hopefully, it's just something that requires some finagling and not a hardware incompatibility thing :(...

definitely not hardware issue , jetson has cuda cores, im guessing it just some missing library or some pytorch addon to make it work on the jetson

EDIT: just finished removing re-installing from this guide https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-8-0-now-available/72048 and it finally passed the error code

staberas avatar Mar 29 '21 19:03 staberas