Repository: stable-diffusion-webui
Issue: [Bug]: TypeError: Trying to convert BFloat16 to the MPS backend but it does not have support for that dtype.
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?

Mac M2 Cpu

An error was reported during startup, but the console can be opened. Same error after clicking Generate button

### Steps to reproduce the problem

./webui.sh


### What should have happened?

 no error

### Sysinfo
Mac M2

TypeError: Trying to convert BFloat16 to the MPS backend but it does not have support for that dtype

### What browsers do you use to access the UI ?

Google Chrome

### Console logs

```Shell
To create a public link, set `share=True` in `launch()`.
Startup time: 4.8s (import torch: 1.3s, import gradio: 0.4s, setup paths: 0.4s, other imports: 0.5s, load scripts: 0.5s, create ui: 1.3s, gradio launch: 0.1s).
loading stable diffusion model: TypeError
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 930, in _bootstrap
    self._bootstrap_inner()
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/***/stable-diffusion-webui/modules/initialize.py", line 147, in load_model
    shared.sd_model  # noqa: B018
  File "/Users/***/stable-diffusion-webui/modules/shared_items.py", line 110, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "/Users/***/stable-diffusion-webui/modules/sd_models.py", line 499, in get_sd_model
    load_model()
  File "/Users/***/stable-diffusion-webui/modules/sd_models.py", line 626, in load_model
    load_model_weights(sd_model, checkpoint_info, state_dict, timer)
  File "/Users/***/stable-diffusion-webui/modules/sd_models.py", line 381, in load_model_weights
    model.half()
  File "/Users/***/stable-diffusion-webui/venv/lib/python3.9/site-packages/lightning_fabric/utilities/device_dtype_mixin.py", line 98, in half
    return super().half()
  File "/Users/***/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1001, in half
    return self._apply(lambda t: t.half() if t.is_floating_point() else t)
  File "/Users/***/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 797, in _apply
    module._apply(fn)
  File "/Users/***/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 797, in _apply
    module._apply(fn)
  File "/Users/***/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 797, in _apply
    module._apply(fn)
  [Previous line repeated 1 more time]
  File "/Users/***/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 820, in _apply
    param_applied = fn(param)
  File "/Users/***/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1001, in <lambda>
    return self._apply(lambda t: t.half() if t.is_floating_point() else t)
TypeError: Trying to convert BFloat16 to the MPS backend but it does not have support for that dtype.


Stable diffusion model failed to load
Applying attention optimization: sub-quadratic... done.
```


### Additional information

_No response_