- Set PYTHON path to the specific Python executable.
- Add COMMANDLINE_ARGS to skip CUDA test during setup.
- Define STABLE_DIFFUSION_REPO and STABLE_DIFFUSION_COMMIT_HASH for repository management.
- Create preflight log files to capture errors during the fetching of the Stable Diffusion repository, including issues with malformed URLs and repository not found errors.
This also handles type casting so that ROCm and MPS torch devices work correctly without --no-half. One cast is required for deepbooru in deepbooru_model.py, some explicit casting is required for img2img and inpainting. depth_model can't be converted to float16 or it won't work correctly on some systems (it's known to have issues on MPS) so in sd_models.py model.depth_model is removed for model.half().