Cast `torch.bmm` args into same `dtype`.
Fixes the following error when using Text Inversion embedding (#14224):
```
RuntimeError: could not create a primitive descriptor for a matmul
primitive
```
Fixes failing dependency checks for extensions having a different package name and import name (for example ffmpeg-python / ffmpeg), which currently is causing the unneeded reinstall of packages at runtime.
In fact with current code, the same string is used when installing a package and when checking for its presence, as you can see in the following example:
> launch_utils.run_pip("install ffmpeg-python", "required package")
[ Installing required package: "ffmpeg-python" ... ]
[ Installed ]
> launch_utils.is_installed("ffmpeg-python")
False
... which would actually return true with:
> launch_utils.is_installed("ffmpeg")
True
This tries to execute interpolate with FP32 if it failed.
Background is that
on some environment such as Mx chip MacOS devices, we get error as follows:
```
"torch/nn/functional.py", line 3931, in interpolate
return torch._C._nn.upsample_nearest2d(input, output_size, scale_factors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: "upsample_nearest2d_channels_last" not implemented for 'Half'
```
In this case, ```--no-half``` doesn't help to solve. Therefore this commits add the FP32 fallback execution to solve it.
Note that the ```upsample_nearest2d``` is called from ```torch.nn.functional.interpolate```.
And the fallback for torch.nn.functional.interpolate is necessary at
```modules/sd_vae_approx.py``` 's ```VAEApprox.forward```
```repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/openaimodel.py``` 's ```Upsample.forward```
autocrop.download_and_cache_models
in opencv >= 4.8 the face detection model was updated
download the base on opencv version
returns the model path or raise exception
fixes issue where "--use-cpu" all properly makes SD run on CPU but leaves ControlNet (and other extensions, I presume) pointed at GPU, causing a crash in ControlNet caused by a mismatch between devices between SD and CN
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/14097