add update function to xtts and background remover

This commit is contained in:
Mathieu Broillet 2024-08-10 21:39:51 +02:00
parent 5b8cd23b85
commit 5bfd325be8
Signed by: mathieu
GPG Key ID: A08E484FE95074C1
2 changed files with 11 additions and 2 deletions

View File

@ -4,7 +4,11 @@ python_exec="$(pwd)/venv/bin/python3.10"
# Function to install StableDiffusion # Function to install StableDiffusion
install_background_remover() { 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..." 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 git clone ssh://git@git.broillet.ch:222/Clone/dis-background-removal.git webui
echo "Installing requirements..." echo "Installing requirements..."

View File

@ -2,10 +2,15 @@
source ../utils.sh source ../utils.sh
python_exec=venv/bin/python3.10 python_exec=venv/bin/python3.10
# Function to install StableDiffusion # Function to install/update StableDiffusion
install_xtts() { install_xtts() {
if [ -d "webui" ]; then if [ -d "webui" ]; then
echo "XTTS repository already exists. Skipping clone." 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 else
echo "Cloning XTTS repository..." echo "Cloning XTTS repository..."
git clone https://github.com/daswer123/xtts-webui webui git clone https://github.com/daswer123/xtts-webui webui
@ -32,7 +37,7 @@ main() {
clean clean
echo "XTTS installation complete." echo "XTTS installation/update complete."
} }
# Run main function # Run main function