Update webui-macos-env.sh

fix for this
```
ERROR: Could not find a version that satisfies the requirement torch==2.3.1 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2)
ERROR: No matching distribution found for torch==2.3.1
Traceback (most recent call last):
  File "/Users/shinriyo/development/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/Users/shinriyo/development/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/Users/shinriyo/development/stable-diffusion-webui/modules/launch_utils.py", line 381, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "/Users/shinriyo/development/stable-diffusion-webui/modules/launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/Users/shinriyo/development/stable-diffusion-webui/venv/bin/python" -m pip install torch==2.3.1 torchvision==0.18.1
Error code: 1
```
This commit is contained in:
shinriyo 2025-02-08 16:12:51 +09:00 committed by GitHub
parent 82a973c043
commit eb60fc7acb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,13 +5,15 @@
####################################################################
export install_dir="$HOME"
export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate"
# export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate"
export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling
--no-half-vae --use-cpu interrogate --no-half"
export PYTORCH_ENABLE_MPS_FALLBACK=1
if [[ "$(sysctl -n machdep.cpu.brand_string)" =~ ^.*"Intel".*$ ]]; then
export TORCH_COMMAND="pip install torch==2.1.2 torchvision==0.16.2"
else
export TORCH_COMMAND="pip install torch==2.3.1 torchvision==0.18.1"
export TORCH_COMMAND="pip install torch==2.2.2 torchvision==0.17.2"
fi
####################################################################