Repository: stable-diffusion-webui
Issue: [Bug]: Couldn't install torch
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've already attempted solutions like reinstalling python 3.10.6, deleting venv, doing both at the same time, manually installing torchvision via a .whl file, none of those work. Webui.bat still gives this error. 

### Steps to reproduce the problem

1. Go to Webui.bat
2. Press Open
3. Unable to install torchvision


### What should have happened?

Stable Diffusion completes the installation and starts as normal.

### Version or Commit where the problem happens

1.4.0

### What Python version are you running on ?

Python 3.10.x

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

Windows

### What device are you running WebUI on?

Nvidia GPUs (GTX 16 below)

### Cross attention optimization

None 

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

Mozilla Firefox

### Command Line Arguments

```Shell
--lowvram
```


### List of extensions

No

### Console logs

```Shell
venv "D:\AI\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.4.1
Commit hash: f865d3e11647dfd6c7b2cdf90dde24680e58acd8
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118
Collecting torch==2.0.1
ERROR: Exception:
Traceback (most recent call last):
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\cli\req_command.py", line 247, in wrapper
    return func(self, options, args)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\commands\install.py", line 369, in run
    requirement_set = resolver.resolve(
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 348, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteria
    if not criterion.candidates:
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 151, in __bool__
    return bool(self._sequence)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
    return any(self)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
    candidate = func()
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 297, in __init__
    super().__init__(
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 162, in __init__
    self.dist = self._prepare()
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 231, in _prepare
    dist = self._prepare_distribution()
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 308, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 438, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 483, in _prepare_linked_requirement
    local_file = unpack_url(
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 165, in unpack_url
    file = get_http_url(
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 106, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\network\download.py", line 134, in __call__
    resp = _http_get_download(self._session, link)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\network\download.py", line 117, in _http_get_download
    resp = session.get(target_url, headers=HEADERS, stream=True)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_internal\network\session.py", line 518, in request
    return super().request(method, url, *args, **kwargs)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 48, in send
    cached_response = self.controller.cached_request(request)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\cachecontrol\controller.py", line 155, in cached_request
    resp = self.serializer.loads(request, cache_data, body_file)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\cachecontrol\serialize.py", line 95, in loads
    return getattr(self, "_loads_v{}".format(ver))(request, data, body_file)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\cachecontrol\serialize.py", line 186, in _loads_v4
    cached = msgpack.loads(data, raw=False)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 125, in unpackb
    ret = unpacker._unpack()
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 590, in _unpack
    ret[key] = self._unpack(EX_CONSTRUCT)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 590, in _unpack
    ret[key] = self._unpack(EX_CONSTRUCT)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 544, in _unpack
    typ, n, obj = self._read_header()
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 486, in _read_header
    obj = self._read(n)
  File "D:\AI\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 403, in _read
    ret = self._buffer[i : i + n]
MemoryError

[notice] A new release of pip available: 22.2.1 -> 23.2.1
[notice] To update, run: D:\AI\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip
Traceback (most recent call last):
  File "D:\AI\stable-diffusion-webui\launch.py", line 38, in <module>
    main()
  File "D:\AI\stable-diffusion-webui\launch.py", line 29, in main
    prepare_environment()
  File "D:\AI\stable-diffusion-webui\modules\launch_utils.py", line 265, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "D:\AI\stable-diffusion-webui\modules\launch_utils.py", line 107, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "D:\AI\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118
Error code: 2
Press any key to continue . . .
```
```


### Additional information

_No response_