Repository: stable-diffusion-webui
Issue: [Bug]: Installation issues on system with AMD CPU with integrated graphics and Nvidia 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?

on first install on a system with a AMD 7950x and a RTX 4090 the wrong version of torch is installed

log of a run after deleting the venv folder:
```
❯ ./webui.sh --xformers --device-id 0 --skip-torch-cuda-test --precision full --no-half --no-half-vae

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on gen user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc.so.4
Python 3.11.3 (main, Jun  5 2023, 09:32:32) [GCC 13.1.1 20230429]
Version: v1.3.2
Commit hash: baf6946e06249c5af9851c60171692c44ef633e0
Installing torch and torchvision
Looking in indexes: https://download.pytorch.org/whl/rocm5.4.2
Collecting torch==2.0.1+rocm5.4.2
  Using cached https://download.pytorch.org/whl/rocm5.4.2/torch-2.0.1%2Brocm5.4.2-cp311-cp311-linux_x86_64.whl (1536.4 MB)
^CERROR: Operation cancelled by user
```


### Steps to reproduce the problem

test on system with AMD iGPU and Nvidia GPU

output of `lspci 2>/dev/null | grep -E "VGA|Display"`:
```
01:00.0 VGA compatible controller: NVIDIA Corporation AD102 [GeForce RTX 4090] (rev a1)
0c:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raphael (rev c1)
```

### What should have happened?

install cuda torch not rocm torch 

### Version or Commit where the problem happens

version: v1.3.2  •  python: 3.11.3  •  torch: 2.0.1+cu118  •  xformers: 0.0.20  •  gradio: 3.32.0  •  checkpoint: 5d5ad06cc2

### What Python version are you running on ?

Python 3.11.x (above, no supported yet)

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

Linux

### What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

### Cross attention optimization

xformers

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

_No response_

### Command Line Arguments

```Shell
--xformers --device-id 0 --skip-torch-cuda-test --precision full --no-half --no-half-vae
```


### List of extensions

not relevant

### Console logs

```Shell
see: what happened and additional information
```


### Additional information

after changing the line 
`if echo "$gpu_info" | grep -q "AMD" && [[ -z "${TORCH_COMMAND}" ]]` in webui.sh to `if echo "$gpu_info" | grep -q "AMDx" && [[ -z "${TORCH_COMMAND}" ]]` to prevent it from finding the amd iGPU the correct version of torch is installed:

```
❯ ./webui.sh --xformers --device-id 0 --skip-torch-cuda-test --precision full --no-half --no-half-vae

[...]

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc.so.4
Python 3.11.3 (main, Jun  5 2023, 09:32:32) [GCC 13.1.1 20230429]
Version: v1.3.2
Commit hash: baf6946e06249c5af9851c60171692c44ef633e0
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118
Collecting torch==2.0.1
  Downloading https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp311-cp311-linux_x86_64.whl (2267.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 GB 4.3 MB/s eta 0:00:00
Collecting torchvision==0.15.2
  Downloading https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp311-cp311-linux_x86_64.whl (6.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 38.1 MB/s eta 0:00:00
[...]
```