lucidrains / deep-daze

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network). Technique was originally created by https://twitter.com/advadnoun
MIT License
4.37k stars 327 forks source link

AssertionError: CUDA must be available in order to use Deep Daze #78

Closed itsHNTR closed 3 years ago

itsHNTR commented 3 years ago

File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Python39\Scripts\imagine.exe__main__.py", line 4, in File "c:\python39\lib\site-packages\deep_daze__init__.py", line 1, in from deep_daze.deep_daze import DeepDaze, Imagine File "c:\python39\lib\site-packages\deep_daze\deep_daze.py", line 25, in assert torch.cuda.is_available(), 'CUDA must be available in order to use Deep Daze' AssertionError: CUDA must be available in order to use Deep Daze

I have installed the CUDA ToolKit, what do i need to do to fix this?

itsHNTR commented 3 years ago

i have since fixed this, but i am now getting Runtime error method 'forward' not defined

NuclearSurvivor commented 3 years ago

Try running these in chronological order in a new command line.

python -m venv --system-site-packages .\venv

.\venv\Scripts\activate

pip install --upgrade pip

pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio===0.8.0 -f https://download.pytorch.org/whl/torch_stable.html

pip install --upgrade CLIP

`pip install --upgrade tensorflow

pip install --upgrade wheel

pip install --upgrade deep-daze

I'm sure you did most of these but just to be sure all the installations are up-to-date and he should have fixed that issue in the 1.7.2 update of deep daze so, therefore, I'm asking you to see if there are any installations out of date. I might have missed some information so let me know where this gets you

raclettes commented 3 years ago

i have since fixed this, but i am now getting Runtime error method 'forward' not defined

This has been fixed in the 0.7.2 release, just reinstall from pip and you're good to go

NuclearSurvivor commented 3 years ago

He needs to upgrade Deep-Daze upgrading pip will just do that, upgrade pip. If that doesn't work just try upgrading Deep daze.

AvaritiaLimited commented 3 years ago

How did you fix that error @itsHNTR? My conda environment has TensorFlow, cudatoolkit, and cudaDNN installed. I ran through those steps from above with no resolve.

EDIT Nevermind. That worked. Thanks!

duckingwhimsical commented 3 years ago

FYI I had this same error with big-sleep and ran these steps and it fixed it. Thanks!

ghost commented 3 years ago

pip install --upgrade tensorflow doesnt work for me I guess tensorflow is missing? I'm trying to download a different visual studio distributable (2015-2019) that apparently includes this. Am I on track?

NuclearSurvivor commented 3 years ago

try to do

python -m venv --system-site-packages .\venv .\venv\Scripts\activate to create a virtual environment then do these to upgrade pip and install tensorflow 1.15 pip install --upgrade pip pip install tensorflow-gpu==1.15

ninjachen commented 3 years ago

Still got this error. imagine "a house in the forest" Traceback (most recent call last): File "/usr/local/bin/imagine", line 5, in <module> from deep_daze.cli import main File "/usr/local/lib/python3.7/site-packages/deep_daze/__init__.py", line 1, in <module> from deep_daze.deep_daze import DeepDaze, Imagine File "/usr/local/lib/python3.7/site-packages/deep_daze/deep_daze.py", line 23, in <module> assert torch.cuda.is_available(), 'CUDA must be available in order to use Deep Daze' AssertionError: CUDA must be available in order to use Deep Daze

My env is :

  1. pip-21.0.1
  2. deep_daze-0.8.1
  3. torch-1.8.1-cp37-none-macosx_10_9_x86_64.whl
jaygupta-2k commented 3 years ago

@itsHNTR how did you rectify the AssertionError? Can you help me out?

MaxDesplanches commented 3 years ago

same issue here

calebrader commented 3 years ago

I'm also getting this error.