Skip to content

Commit

Permalink
Merge pull request #15851 from viking1304/torch-on-mac
Browse files Browse the repository at this point in the history
Use different torch versions for Intel and ARM Macs
  • Loading branch information
AUTOMATIC1111 authored Jun 8, 2024
2 parents 93b53dc + 5867be2 commit 616013f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webui-macos-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ fi

export install_dir="$HOME"
export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate"
export TORCH_COMMAND="pip install torch==2.1.0 torchvision==0.16.0"
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.0 torchvision==0.18.0"
fi

####################################################################

0 comments on commit 616013f

Please sign in to comment.