From 5ec8981df46ff6e678c09dd2c1bf4d873ac22a46 Mon Sep 17 00:00:00 2001 From: brkirch Date: Sat, 3 Dec 2022 02:28:53 -0500 Subject: Revert most launch.py changes, add mac user script Adds an addition file to read environment variables from when the webui.sh is run from macOS. --- webui-macos-env.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 webui-macos-env.sh (limited to 'webui-macos-env.sh') diff --git a/webui-macos-env.sh b/webui-macos-env.sh new file mode 100644 index 00000000..68d1f754 --- /dev/null +++ b/webui-macos-env.sh @@ -0,0 +1,13 @@ +#!/bin/bash +#################################################################### +# macOS defaults # +# Please modify webui-user.sh to change these instead of this file # +#################################################################### + +export COMMANDLINE_ARGS="--skip-torch-cuda-test --no-half --use-cpu interrogate" +export TORCH_COMMAND="pip install torch==1.12.1 torchvision==0.13.1" +export K_DIFFUSION_REPO="https://github.com/brkirch/k-diffusion.git" +export K_DIFFUSION_COMMIT_HASH="51c9778f269cedb55a4d88c79c0246d35bdadb71" +export PYTORCH_ENABLE_MPS_FALLBACK=1 + +#################################################################### -- cgit v1.2.3 From 760a7836eb1f8645b7c32df82085383e1859c74d Mon Sep 17 00:00:00 2001 From: brkirch Date: Sun, 4 Dec 2022 08:29:10 -0500 Subject: Use python3.10 for python_cmd if available --- webui-macos-env.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'webui-macos-env.sh') diff --git a/webui-macos-env.sh b/webui-macos-env.sh index 68d1f754..21ca1dfd 100644 --- a/webui-macos-env.sh +++ b/webui-macos-env.sh @@ -4,6 +4,11 @@ # Please modify webui-user.sh to change these instead of this file # #################################################################### +if [[ -x "$(command -v python3.10)" ]] +then + python_cmd="python3.10" +fi + export COMMANDLINE_ARGS="--skip-torch-cuda-test --no-half --use-cpu interrogate" export TORCH_COMMAND="pip install torch==1.12.1 torchvision==0.13.1" export K_DIFFUSION_REPO="https://github.com/brkirch/k-diffusion.git" -- cgit v1.2.3 From a7b1ab28d562ef8a020be0129cbc4c521569cd24 Mon Sep 17 00:00:00 2001 From: brkirch Date: Sun, 4 Dec 2022 08:29:45 -0500 Subject: Set install_dir (per Ephil012's suggestion) Set install_dir to a correct value for macOS. Thanks to @Ephil012 for pointing out this is needed. --- webui-macos-env.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'webui-macos-env.sh') diff --git a/webui-macos-env.sh b/webui-macos-env.sh index 21ca1dfd..95ca9c55 100644 --- a/webui-macos-env.sh +++ b/webui-macos-env.sh @@ -9,6 +9,7 @@ then python_cmd="python3.10" fi +export install_dir="$HOME" export COMMANDLINE_ARGS="--skip-torch-cuda-test --no-half --use-cpu interrogate" export TORCH_COMMAND="pip install torch==1.12.1 torchvision==0.13.1" export K_DIFFUSION_REPO="https://github.com/brkirch/k-diffusion.git" -- cgit v1.2.3