Repository: stable-diffusion-webui
Issue: [Bug]: Torch is not able to use GPU
Labels: asking-for-help-with-local-system-issues

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?



Opened A1111 a few days ago, UI wouldn't load, checked the cmd prompt and it showed xformers and Torch needed updated, followed instructions.

OS Win 11, latest update, Geforce 3070Ti, latest drivers. Installed CUDN toolkit (as I was installing Vlad1111 a week or so before this and it runs fine), Python 3.10.9

### Steps to reproduce the problem

1. Open Web-UI
2. Wait a few seconds
3. ERROR


### What should have happened?

It loaded without an error

### Commit where the problem happens

5ab7f213bec2f816f9c5644becb32eb72c8ffb89

### What platforms do you use to access the UI ?

Windows

### What browsers do you use to access the UI ?

Mozilla Firefox

### Command Line Arguments

```Shell
The same issue persists with the --reinstall commands for xformers, torch, the --xformers command aswell and no commands.
```


### List of extensions

NA

### Console logs

```Shell
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Commit hash: 5ab7f213bec2f816f9c5644becb32eb72c8ffb89
Traceback (most recent call last):
  File "C:\Users\SC\stable-diffusion-webui\launch.py", line 352, in <module>
    prepare_environment()
  File "C:\Users\SC\stable-diffusion-webui\launch.py", line 257, in prepare_environment
    run_python("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'")
  File "C:\Users\SC\stable-diffusion-webui\launch.py", line 120, in run_python
    return run(f'"{python}" -c "{code}"', desc, errdesc)
  File "C:\Users\SC\stable-diffusion-webui\launch.py", line 96, in run
    raise RuntimeError(message)
RuntimeError: Error running command.
Command: "C:\Users\SC\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: Traceback (most recent call last):
  File "<string>", line 1, in <module>
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check


Press any key to continue . . .
```


### Additional information

I had installed Vlad1111 a week before and it loads just fine.

I have tried deleting the env and reinstalling multiple times.
Tried a fresh install, also deleting env and reinstalling, multiple times.
Tried installing the latest torch manually.
Reinstalling Python, .
When deleting the env and letting things reinstall, sometimes the site wouldn't connect and it would draw files from the cache so I have also tried after using the pip command to wipe the cache, it would re-download the files... and the problem still appears.

It DID work briefly after a new graphics card came out a few days ago but after i restarted my computer, the problem returned. It has worked briefly a few times but for whatever reason the error re appears, i can't understand what is going on.