diff --git a/webui.sh b/webui.sh index 38258ef63..d931eb429 100755 --- a/webui.sh +++ b/webui.sh @@ -113,15 +113,20 @@ then exit 1 fi -if [[ -d .git ]] -then - printf "\n%s\n" "${delimiter}" - printf "Repo already cloned, using it as install directory" - printf "\n%s\n" "${delimiter}" +if [[ -d stable-diffusion-webui ]]; then + message="Folder 'stable-diffusion-webui' exists, using it as install directory" + install_dir="${install_dir}/stable-diffusion-webui" + clone_dir="${clone_dir}/stable-diffusion-webui" +elif [[ -d .git ]]; then + message="Repo already cloned, using it as install directory" install_dir="${PWD}/../" clone_dir="${PWD##*/}" fi +if [[ -n "$message" ]]; then + printf "\n%s\n%s\n%s\n" "${delimiter}" "$message" "${delimiter}" +fi + # Check prerequisites gpu_info=$(lspci 2>/dev/null | grep -E "VGA|Display") case "$gpu_info" in