Repository: stable-diffusion-webui
Issue: [Bug]: RuntimeError: Torch is not able to use GPU wit Nvidia GPU
Labels: bug-report

### Checklist

- [ ] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

Hi, 
I am running a Linuy Ubuntu 22.04 machine with with an AMD APU (Ryzen 4700g) and a Nvidea GPU (tesla P40).
I tried to install WebUi multiple times but always tun into the same issue. 

"RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check"

![WebUi](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/159269841/14dd5c4a-bafb-4cd1-b35a-3c24dcae6cd8)

Of course i made sure that the enviroment is working: 

![Nvidia](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/159269841/00fa0b8a-50dc-45e2-8ca3-6a9bda397066)
![torch](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/159269841/c0396bd3-48cb-4b2d-945f-aedfbc285b72)

Now after google and and a week o trial and erro i think the issue might be that i have 2 GPU and it tries to run the WebUi on the APU and not my GPU. 

Is that correct? How do i fix this? 

Thank you in advance!

### Steps to reproduce the problem

1. Install WebUi on Ubuntu server 22.04 with and AMD APU and an additional Nvidea GPU.
2. Install all Drivers corectly
3. run WebUi

### What should have happened?

I think the WebUi should know which GPU to use when runing cuda

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

_No response_

### Sysinfo

if i do as told, i only get errors.

### Console logs

```Shell
ops@opserver:~/stable-diffusion-webui$ ./webui.sh

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on ops user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Experimental support for Renoir: make sure to have at least 4GB of VRAM and 10GB of RAM or enable cpu mode: --use-cpu all --no-half
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
glibc version is 2.35
Check TCMalloc: libtcmalloc_minimal.so.4
./webui.sh: line 246: bc: command not found
./webui.sh: line 246: [: -eq: unary operator expected
libtcmalloc_minimal.so.4 is linked with libc.so,execute LD_PRELOAD=/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Version: v1.8.0
Commit hash: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5
Traceback (most recent call last):
  File "/home/ops/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/home/ops/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/home/ops/stable-diffusion-webui/modules/launch_utils.py", line 386, in prepare_environment
    raise RuntimeError(
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
```


### Additional information

All drivers and versions seem to bee correct.