IOPaint icon indicating copy to clipboard operation
IOPaint copied to clipboard

Did not find CUDA device on your computer

Open gaoxuxu110 opened this issue 1 year ago • 10 comments

I have installed cuda, but the WARNING-- “Did not find CUDA device on your computer, fallback to cpu tasks.py:86 Start as desktop app? [y/n] (y):” so,How to use GPU to run this program

gaoxuxu110 avatar Oct 29 '22 09:10 gaoxuxu110

I get the same problem.

Yishaqel avatar Oct 29 '22 10:10 Yishaqel

By default, installer will install pytorch-cu113, it’s looks like it didn’t match your GPU and NVIDIA driver version.

If you can provide the following information, I can suggest the correct PyTorch version (we need a way to auto find this…).

  • What GPU are you using?
  • Your current graphics card driver: https://www.nvidia.com/en-gb/drivers/drivers-faq/

Sanster avatar Oct 29 '22 11:10 Sanster

I am using the 2070 Super graphics card and 522.25 drivers

Yishaqel avatar Oct 29 '22 12:10 Yishaqel

By default, installer will install pytorch-cu113, it’s looks like it didn’t match your GPU and NVIDIA driver version.

If you can provide the following information, I can suggest the correct PyTorch version (we need a way to auto find this…).

  • What GPU are you using?
  • Your current graphics card driver: https://www.nvidia.com/en-gb/drivers/drivers-faq/

I am using the 3070ti graphics card and 526.47 drivers released 10/27/2022

gaoxuxu110 avatar Oct 29 '22 13:10 gaoxuxu110

By default, installer will install pytorch-cu113, it’s looks like it didn’t match your GPU and NVIDIA driver version.

If you can provide the following information, I can suggest the correct PyTorch version (we need a way to auto find this…).

  • What GPU are you using?
  • Your current graphics card driver: https://www.nvidia.com/en-gb/drivers/drivers-faq/

I am using the 3070ti graphics card and 526.47 drivers released 10/27/2022

make sure you have cuda runtime with pytorch.

how did you install , pure pip/conda/docker.

if you just pip install, you need cuda installed in system.(check with nvidia-smi)

if you install with conda, you can install cudatoolkit in conda, also you can still use system cuda.

jinmingyi1998 avatar Oct 29 '22 14:10 jinmingyi1998

By default, installer will install pytorch-cu113, it’s looks like it didn’t match your GPU and NVIDIA driver version. If you can provide the following information, I can suggest the correct PyTorch version (we need a way to auto find this…).

  • What GPU are you using?
  • Your current graphics card driver: https://www.nvidia.com/en-gb/drivers/drivers-faq/

I am using the 3070ti graphics card and 526.47 drivers released 10/27/2022

make sure you have cuda runtime with pytorch.

how did you install , pure pip/conda/docker.

if you just pip install, you need cuda installed in system.(check with nvidia-smi)

if you install with conda, you can install cudatoolkit in conda, also you can still use system cuda.

I installed by [One Click Installer] and all files were automatically installed by the program.

Here is Environment information:

git version 2.34.1.windows.1
conda 22.9.0
/h/Deepfacelab/lama-cleaner/installer/python
Python 3.10.6
/h/Deepfacelab/lama-cleaner/installer/Scripts/pip
pip 22.2.2 from H:\Deepfacelab\lama-cleaner\installer\lib\site-packages\pip (python 3.10)
diffusers              0.6.0
lama-cleaner           0.24.4
opencv-python          4.6.0.66
torch                  1.13.0

gaoxuxu110 avatar Oct 29 '22 14:10 gaoxuxu110

There is something wrong with the win_config.bat script, it didn't install a CUDA version of pytorch 😅 , please change it to the follow content and re-execute it

@echo off

set PATH=C:\Windows\System32;%PATH%

@call installer\Scripts\activate.bat

@call conda-unpack

@call conda install -y cudatoolkit=11.3 -c pytorch
@call pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
@call pip3 install -U lama-cleaner


@call invoke config

Sanster avatar Oct 29 '22 14:10 Sanster

By default, installer will install pytorch-cu113, it’s looks like it didn’t match your GPU and NVIDIA driver version. If you can provide the following information, I can suggest the correct PyTorch version (we need a way to auto find this…).

  • What GPU are you using?
  • Your current graphics card driver: https://www.nvidia.com/en-gb/drivers/drivers-faq/

I am using the 3070ti graphics card and 526.47 drivers released 10/27/2022

make sure you have cuda runtime with pytorch.

how did you install , pure pip/conda/docker.

if you just pip install, you need cuda installed in system.(check with nvidia-smi)

if you install with conda, you can install cudatoolkit in conda, also you can still use system cuda.

I installed by [One Click Installer] and all files were automatically installed by the program.

Here is Environment information:

git version 2.34.1.windows.1
conda 22.9.0
/h/Deepfacelab/lama-cleaner/installer/python
Python 3.10.6
/h/Deepfacelab/lama-cleaner/installer/Scripts/pip
pip 22.2.2 from H:\Deepfacelab\lama-cleaner\installer\lib\site-packages\pip (python 3.10)
diffusers              0.6.0
lama-cleaner           0.24.4
opencv-python          4.6.0.66
torch                  1.13.0

torch version is 1.13, it seems a cpu version.

one click installer is a stand-alone runtime environment with conda. it will install cudatoolkit and pytorch gpu version. can you go into that conda env to check conda list

jinmingyi1998 avatar Oct 29 '22 15:10 jinmingyi1998

@jinmingyi1998

There is something wrong with the win_config.bat script, it didn't install a CUDA version of pytorch 😅 , please change it to the follow content and re-execute it

@echo off

set PATH=C:\Windows\System32;%PATH%

@call installer\Scripts\activate.bat

@call conda-unpack

@call conda install -y cudatoolkit=11.3 -c pytorch
@call pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
@call pip3 install -U lama-cleaner


@call invoke config

👆👆👆👆👆👆 Solve my problem perfectly

gaoxuxu110 avatar Oct 29 '22 16:10 gaoxuxu110

@jinmingyi1998

There is something wrong with the win_config.bat script, it didn't install a CUDA version of pytorch 😅 , please change it to the follow content and re-execute it

@echo off

set PATH=C:\Windows\System32;%PATH%

@call installer\Scripts\activate.bat

@call conda-unpack

@call conda install -y cudatoolkit=11.3 -c pytorch
@call pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
@call pip3 install -U lama-cleaner


@call invoke config

👆👆👆👆👆👆 Solve my problem perfectly

already in pr !105

jinmingyi1998 avatar Oct 29 '22 16:10 jinmingyi1998