2022-09-03 14:25:38 +02:00
printf "\n\nStable Diffusion UI\n\n"
2022-09-02 18:24:32 +02:00
2022-09-03 14:38:52 +02:00
if [ -f "scripts/install_status.txt" ] && [ ` grep -c sd_ui_git_cloned scripts/install_status.txt` -gt "0" ] ; then
2022-09-02 18:24:32 +02:00
echo "Stable Diffusion UI's git repository was already installed. Updating.."
cd sd-ui-files
git reset --hard
git pull
cd ..
else
2022-09-03 14:25:38 +02:00
printf "\n\nDownloading Stable Diffusion UI..\n\n"
2022-09-02 18:24:32 +02:00
if git clone https://github.com/cmdr2/stable-diffusion-ui.git sd-ui-files ; then
echo sd_ui_git_cloned >> scripts/install_status.txt
else
2022-09-03 14:25:38 +02:00
printf "\n\nError downloading Stable Diffusion UI. Please try re-running this installer. If it doesn't work, please copy the messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB or file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues\n\n"
2022-09-02 18:24:32 +02:00
read -p "Press any key to continue"
exit
fi
fi
cp -Rf sd-ui-files/ui ui
2022-09-03 09:04:23 +02:00
cp -Rf sd-ui-files/scripts/* scripts/
2022-09-03 16:34:55 +02:00
cp "scripts/start.sh" .
2022-09-02 18:24:32 +02:00
2022-09-03 08:13:05 +02:00
./scripts/on_sd_start.sh