From 5bfd325be86f2b8074cece04cefc205ff9d56dd9 Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Sat, 10 Aug 2024 21:39:51 +0200 Subject: [PATCH] add update function to xtts and background remover --- background-removal-dis-rocm/install.sh | 4 ++++ xtts-rocm/install.sh | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/background-removal-dis-rocm/install.sh b/background-removal-dis-rocm/install.sh index 07089c9..0801369 100755 --- a/background-removal-dis-rocm/install.sh +++ b/background-removal-dis-rocm/install.sh @@ -4,7 +4,11 @@ python_exec="$(pwd)/venv/bin/python3.10" # Function to install StableDiffusion install_background_remover() { + # As no data is stored in the webui folder, we can re-run the installation process for updates + rm -R webui -f + echo "Cloning webui..." + # original repo (hf): https://huggingface.co/spaces/ECCV2022/dis-background-removal/tree/main git clone ssh://git@git.broillet.ch:222/Clone/dis-background-removal.git webui echo "Installing requirements..." diff --git a/xtts-rocm/install.sh b/xtts-rocm/install.sh index 20ff6f0..04568a9 100755 --- a/xtts-rocm/install.sh +++ b/xtts-rocm/install.sh @@ -2,10 +2,15 @@ source ../utils.sh python_exec=venv/bin/python3.10 -# Function to install StableDiffusion +# Function to install/update StableDiffusion install_xtts() { if [ -d "webui" ]; then echo "XTTS repository already exists. Skipping clone." + yes_or_no "Do you want to update XTTS WebUI ?" && { + cd webui + git pull + echo "XTTS WebUI successfully updated." + } else echo "Cloning XTTS repository..." git clone https://github.com/daswer123/xtts-webui webui @@ -32,7 +37,7 @@ main() { clean - echo "XTTS installation complete." + echo "XTTS installation/update complete." } # Run main function