Repository: stable-diffusion-webui
Issue: [Bug]: Selecting AMD GPU with different ARCH then main GPU
Labels: bug-report

### Is there an existing issue for this?

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

### What happened?

I run a System with a RX 6750 XT and a RX 7900 XTX. The 6750 runs perfectly but when I try to select the 7900 XT with `CUDA_VISIBLE_DEVICES` the `webui.sh` still configures everything for the 6750 XT.

### Steps to reproduce the problem

1. Get a system with two AMD GPUs with different ARCH
2. Start the WebUI `CUDA_VISIBLE_DEVICES=<id of secondary gpu> ./webui.sh`


### What should have happened?

I should be able to switch the GPU using `CUDA_VISIBLE_DEVICES`s

### Sysinfo

[sysinfo-2023-12-03-10-43.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/13538644/sysinfo-2023-12-03-10-43.json)


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

Mozilla Firefox

### Console logs

```Shell
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on lukas user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
python venv already activate or run without venv: /data/linux_data/AI/Stable_Diffusion/WebUI/.venvs/sd1100
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.12 (main, Sep  9 2023, 14:12:31) [GCC 13.2.1 20230801]
Version: v1.6.0-443-g4a666381
Commit hash: 4a666381bf98333ba4512db0f0033df5f6a08771
Launching Web UI with arguments: 
amdgpu.ids: No such file or directory
amdgpu.ids: No such file or directory
amdgpu.ids: No such file or directory
amdgpu.ids: No such file or directory
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
[-] ADetailer initialized. version: 23.9.3, num models: 9
2023-12-03 11:44:59,408 - ControlNet - INFO - ControlNet v1.1.313
ControlNet preprocessor location: /data/linux_data/AI/Stable_Diffusion/WebUI/extensions/sd-webui-controlnet/annotator/downloads
2023-12-03 11:44:59,467 - ControlNet - INFO - ControlNet v1.1.313
Loading weights [797dab5e63] from /data/linux_data/AI/Stable_Diffusion/WebUI/models/Stable-diffusion/epicphotogasm_v4One4All.safetensors
Creating model from config: /data/linux_data/AI/Stable_Diffusion/WebUI/configs/v1-inference.yaml
Memory access fault by GPU node-1 (Agent handle: 0x5594059b7700) on address 0x7f598b08e000. Reason: Page not present or supervisor privilege.
./webui.sh: line 256: 15678 Aborted                 (core dumped) "${python_cmd}" -u "${LAUNCH_SCRIPT}" "$@"
```


### Additional information

I'm pretty sure this issue is caused by line 126 in `./webui.sh`: `gpu_info=$(lspci 2>/dev/null | grep -E "VGA|Display")`

This command will output all GPUs of the system regardless of the value of `CUDA_VISIBLE_DEVICES`

```bash
00:02.0 Display controller: Intel Corporation AlderLake-S GT1 (rev 0c)
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] (rev c0)
09:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX] (rev c8)
```

Which means the switch-case statement selecting the torch command and setting `HSA_OVERRIDE_GFX_VERSION` will do this based on the first GPU listed in the command