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

### Checklist

- [X] The issue exists after disabling all extensions
- [ ] 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
- [ ] 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?

```
(sd-web) [root@localhost stable-diffusion-webui]# CUDA_VISIBLE_DEVICES=0 ./webui.sh --listen --enable-insecure-extension-access --api

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on root user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
glibc version is 2.17
Check TCMalloc: libtcmalloc_minimal.so.4
libtcmalloc_minimal.so.4 is not linked with libpthread will trigger undefined symbol: pthread_Key_create error
Check TCMalloc: libtcmalloc.so.4
libtcmalloc.so.4 is linked with libpthread,execute LD_PRELOAD=/lib64/libtcmalloc.so.4
/home/xxx/anaconda3/envs/sd-web/bin/python3
Python 3.11.0 (main, Mar  1 2023, 18:26:19) [GCC 11.2.0]
Version: v1.8.0
Commit hash: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5
Traceback (most recent call last):
  File "/app/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/app/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/app/stable-diffusion-webui/modules/launch_utils.py", line 388, 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
(sd-web) [root@localhost stable-diffusion-webui]# /home/xxx/anaconda3/envs/sd-web/bin/python3 -c 'import torch;print(torch.__version__);print(torch.cuda.is_available())'
2.2.1
True
(sd-web) [root@localhost stable-diffusion-webui]# /home/xxx/anaconda3/envs/sd-web/bin/python3 -c 'import torch;print(torch.__version__);print(torch.cuda.is_available())'
2.2.1
True
(sd-web) [root@localhost stable-diffusion-webui]# python3 -c 'import torch;print(torch.__version__);print(torch.cuda.is_available())'
2.2.1
True
(sd-web) [root@localhost stable-diffusion-webui]# python -c 'import torch;print(torch.__version__);print(torch.cuda.is_available())'
2.2.1
True
(sd-web) [root@localhost stable-diffusion-webui]#
```

### Steps to reproduce the problem

x

### What should have happened?

x

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

Google Chrome

### Sysinfo

CentOS Linux release 7.9.2009 (Core)
5.4.275-1.el7.elrepo.x86_64

### Console logs

```Shell
x
```


### Additional information

_No response_