# \--skip-torch-cuda- error first install

**URL:** <https://discuss.huggingface.co/t/skip-torch-cuda-error-first-install/26850>\
**Category:** 🧨 Diffusers\
**Created:** [November 28, 2022, 10:32am UTC](https://discuss.huggingface.co/t/skip-torch-cuda-error-first-install/26850 "2022-11-28T10:32:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sire](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sire](https://discuss.huggingface.co/u/sire)\
**Post date:** [November 28, 2022, 10:32am UTC](https://discuss.huggingface.co/t/skip-torch-cuda-error-first-install/26850/1 "2022-11-28T10:32:41Z")

</div>

Conda was installed already, and in path.

Since it was previously installed it’s causing problems.  
` When installing Anaconda, you have the option to “Add Anaconda to my PATH environment variable.” This is not recommended because the add to PATH option appends Anaconda to PATH. When the installer appends to PATH, it does not call the activation scripts.`

The error starts like this running webui.bat for first time:

> AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE\_ARGS variable to disable this check

^ following these instructions didn’t solve it.

“Warning:  
This Python interpreter is in a conda environment, but the environment has  
not been activated. Libraries may fail to load. To activate this environment  
please see [Managing environments — conda 23.10.1.dev62 documentation](https://conda.io/activation)”

So in the Conda directory, Conda/Envs is empty.

Instructions are to:

- To activate an environment: # # # # conda activate myenv
- Replace myenv with the environment name or directory path.

> cd C:\Users\user\anaconda3  
> conda create --name newenv  
> conda activate newenv  
> (newenv) C:\Users\user\anaconda3\>

^ this worked.

- So I launch webui.bat again ( keeping the “–skip-torch-cuda-test” argument in webui-user.bat)

- The same error…  
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE\_ARGS variable to disable this check

I try

> C:\Users\user\anaconda3\>conda activate python  
> Could not find conda environment: python  
> You can list all discoverable environments with `conda info --envs`.

conda info --envs shows

```auto
Conda environments:
base C:\Users\user\anaconda3
newenv * C:\Users\user\anaconda3\envs\newenv

```

- I try changing environment variables (anaconda exists in user path)
- add some dirs to sys path and user path
- e.g. C:\Users\user\anaconda3\envs\newenv

To no avail.  
By the way, Torch is installed already in E:\ai\stable-diffusion-webui\venv\

More of a complete traceback:

```auto
Command: "E:\ai\stable-diffusion-webui\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'"
Error code: 1
stdout: <empty>
stderr: E:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\cuda\ __init__.py:83: UserWarning: CUDA initialization: CUDA driver initialization failed, you might not have a CUDA gpu. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\c10\cuda\CUDAFunctions.cpp:109.)
  return torch._C._cuda_getDeviceCount() > 0

```

Error persists. How could I “start again” and avoid these errors?

Any ideas I will try as I am unskilled in this domain.

Please help 🤗
