big launcher upgrades

---launcher.sh--- ---install.sh---
-removed question to install XTTS since user already chooses to install XTTS with sillytavern
-removed XTTS install when user chooses to only install extras
+added troubleshooting commands
+put more stuff into a organized category for toolbox
+added uninstall options for: ffmpeg, node.js, p7zip
+added uninstallers to app uninstaller category
+organized the toolbox menu
+added xtts install option
This commit is contained in:
deffcolony
2024-03-22 00:27:43 +01:00
parent 5a021bbb98
commit afe33f485c
4 changed files with 823 additions and 489 deletions

View File

@@ -208,7 +208,7 @@ set /p "choice=Choose Your Destiny (default is 1): "
REM Default to choice 1 if no input is provided REM Default to choice 1 if no input is provided
if not defined choice set "choice=1" if not defined choice set "choice=1"
REM Home - backend REM ################## HOME - BACKEND #########################
if "%choice%"=="1" ( if "%choice%"=="1" (
call :start_st call :start_st
) else if "%choice%"=="2" ( ) else if "%choice%"=="2" (
@@ -459,7 +459,7 @@ echo SillyTavern branch: %cyan_fg_strong%%current_branch%%reset%
echo ================================= echo =================================
set /p brance_choice=Choose Your Destiny: set /p brance_choice=Choose Your Destiny:
REM Switch Brance - backend REM ################# SWITCH BRANCE - BACKEND ########################
if "%brance_choice%"=="1" ( if "%brance_choice%"=="1" (
call :switch_brance_release_st call :switch_brance_release_st
) else if "%brance_choice%"=="2" ( ) else if "%brance_choice%"=="2" (
@@ -824,6 +824,7 @@ echo What would you like to do?
echo 1. Edit Extras Modules echo 1. Edit Extras Modules
echo 2. Edit XTTS Modules echo 2. Edit XTTS Modules
echo 3. Edit Environment Variables echo 3. Edit Environment Variables
echo 4. Edit SillyTavern config.yaml
echo 0. Back to Toolbox echo 0. Back to Toolbox
set /p editor_choice=Choose Your Destiny: set /p editor_choice=Choose Your Destiny:
@@ -835,6 +836,8 @@ if "%editor_choice%"=="1" (
call :edit_xtts_modules call :edit_xtts_modules
) else if "%editor_choice%"=="3" ( ) else if "%editor_choice%"=="3" (
call :edit_environment_var call :edit_environment_var
) else if "%editor_choice%"=="4" (
call :edit_st_config
) else if "%editor_choice%"=="0" ( ) else if "%editor_choice%"=="0" (
goto :toolbox goto :toolbox
) else ( ) else (
@@ -1137,6 +1140,11 @@ rundll32.exe sysdm.cpl,EditEnvironmentVariables
goto :editor goto :editor
:edit_st_config
start "" "%~dp0SillyTavern\config.yaml"
goto :editor
REM ############################################################ REM ############################################################
REM ############## TROUBLESHOOTING - FRONTEND ################## REM ############## TROUBLESHOOTING - FRONTEND ##################
REM ############################################################ REM ############################################################

View File

@@ -297,11 +297,43 @@ install_nodejs_npm() {
fi fi
} }
# Function to install SillyTavern + Extras # Function to install Miniconda
install_st_extras() { install_miniconda() {
echo -e "\033]0;SillyTavern [INSTALL-ST-EXTRAS]\007" # Check if Miniconda is already installed
if command -v conda &>/dev/null; then
log_message "INFO" "Miniconda is already installed. Skipping installation."
return 0 # Exit the function with success status
fi
# Download the Miniconda installer script
wget https://repo.anaconda.com/miniconda/$miniconda_installer -P /tmp
chmod +x /tmp/$miniconda_installer
# Run the installer script
bash /tmp/$miniconda_installer -b -u -p $CONDA_PATH
# Update PATH to include Miniconda
export PATH="$CONDA_PATH/bin:$PATH"
# Activate Conda environment
log_message "INFO" "Activating Miniconda environment..."
source $CONDA_PATH/etc/profile.d/conda.sh
# Create and activate the Conda environment
log_message "INFO" "Disabling conda auto activate..."
conda config --set auto_activate_base false
conda init bash
# Clean up the Downloaded file
rm -rf /tmp/$miniconda_installer
log_message "INFO" "Miniconda installed successfully."
}
# Function to install SillyTavern + Extras + XTTS
install_all() {
echo -e "\033]0;SillyTavern [INSTALL-SILLYTAVERN-EXTRAS-XTTS]\007"
clear clear
echo -e "${blue_fg_strong}/ Installer / SillyTavern + Extras${reset}" echo -e "${blue_fg_strong}/ Installer / SillyTavern + Extras + XTTS${reset}"
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
# Ask the user about the GPU # Ask the user about the GPU
@@ -326,7 +358,7 @@ install_st_extras() {
echo "" echo ""
# Prompt for GPU choice # Prompt for GPU choice
read -p "Enter the number corresponding to your GPU: " gpu_choice read -p "Enter number corresponding to your GPU: " gpu_choice
# GPU menu - Backend # GPU menu - Backend
# Set the GPU choice in an environment variable for choice callback # Set the GPU choice in an environment variable for choice callback
@@ -335,25 +367,25 @@ install_st_extras() {
# Check the user's response # Check the user's response
if [ "$gpu_choice" == "1" ]; then if [ "$gpu_choice" == "1" ]; then
log_message "INFO" "GPU choice set to NVIDIA" log_message "INFO" "GPU choice set to NVIDIA"
install_st_extras_pre install_all_pre
elif [ "$gpu_choice" == "2" ]; then elif [ "$gpu_choice" == "2" ]; then
log_message "INFO" "GPU choice set to AMD" log_message "INFO" "GPU choice set to AMD"
install_st_extras_pre install_all_pre
elif [ "$gpu_choice" == "3" ]; then elif [ "$gpu_choice" == "3" ]; then
log_message "INFO" "Using CPU-only mode" log_message "INFO" "Using CPU-only mode"
install_st_extras_pre install_all_pre
elif [ "$gpu_choice" == "0" ]; then elif [ "$gpu_choice" == "0" ]; then
installer installer
else else
log_message "ERROR" "${red_fg_strong}Invalid number. Please enter a valid number.${reset}" log_message "ERROR" "${red_fg_strong}Invalid number. Please enter a valid number.${reset}"
read -p "Press Enter to continue..." read -p "Press Enter to continue..."
install_st_extras install_all
fi fi
} }
# Function to install_st_extras_pre
install_st_extras_pre() { install_all_pre() {
log_message "INFO" "Installing SillyTavern + Extras..." log_message "INFO" "Installing SillyTavern + Extras + XTTS"
echo -e "${cyan_fg_strong}This may take a while. Please be patient.${reset}" echo -e "${cyan_fg_strong}This may take a while. Please be patient.${reset}"
log_message "INFO" "Installing SillyTavern..." log_message "INFO" "Installing SillyTavern..."
@@ -364,62 +396,7 @@ install_st_extras_pre() {
log_message "INFO" "Cloning SillyTavern-extras repository..." log_message "INFO" "Cloning SillyTavern-extras repository..."
git clone https://github.com/SillyTavern/SillyTavern-extras.git git clone https://github.com/SillyTavern/SillyTavern-extras.git
# Download the Miniconda installer script # Install script for XTTS
wget https://repo.anaconda.com/miniconda/$miniconda_installer -P /tmp
chmod +x /tmp/$miniconda_installer
# Run the installer script
bash /tmp/$miniconda_installer -b -u -p $CONDA_PATH
# Update PATH to include Miniconda
export PATH="$CONDA_PATH/bin:$PATH"
# Activate Conda environment
log_message "INFO" "Activating Miniconda environment..."
source $CONDA_PATH/etc/profile.d/conda.sh
# Create and activate the Conda environment
log_message "INFO" "Disabling conda auto activate..."
conda config --set auto_activate_base false
conda init bash
log_message "INFO" "Creating Conda environment extras..."
conda create -n extras -y
log_message "INFO" "Activating Conda environment extras..."
conda activate extras
# Check if extras activation was successful
if [ $? -eq 0 ]; then
log_message "INFO" "Conda environment extras activated successfully."
else
log_message "ERROR" "${red_fg_strong}Failed to activate Conda environment: extras${reset}"
log_message "INFO" "Press Enter to try again otherwise close the installer and restart."
read -p "Press Enter to try again..."
install_st_extras_pre
fi
log_message "INFO" "Installing Python and Git in the Conda environment..."
conda install python=3.11 git -y
# Provide a link to XTTS
log_message "INFO" "${blue_fg_strong}Feeling excited to give your robotic waifu/husbando a new shiny voice modulator?${reset}"
log_message "INFO" "${blue_fg_strong}To learn more about XTTS, visit:${reset} https://coqui.ai/blog/tts/open_xtts"
# Ask the user if they want to install XTTS
read -p "Install XTTS? [Y/N]: " install_xtts_requirements
# Check the user's response
if [[ "$install_xtts_requirements" == "Y" || "$install_xtts_requirements" == "y" ]]; then
install_xtts
else
log_message "INFO" "XTTS installation skipped."
install_st_extras_post
fi
}
# Function to install_xtts
install_xtts() {
log_message "INFO" "Installing XTTS..." log_message "INFO" "Installing XTTS..."
# Activate the Miniconda installation # Activate the Miniconda installation
@@ -427,16 +404,16 @@ install_xtts() {
source "$miniconda_path/bin/activate" source "$miniconda_path/bin/activate"
# Create a Conda environment named xtts # Create a Conda environment named xtts
log_message "INFO" "Creating Conda environment xtts..." log_message "INFO" "Creating Conda environment: xtts"
conda create -n xtts -y conda create -n xtts python=3.10 git -y
# Activate the xtts environment # Activate the xtts environment
log_message "INFO" "Activating Conda environment xtts..." log_message "INFO" "Activating Conda environment: xtts"
source activate xtts source activate xtts
# Check if xtts activation was successful # Check if xtts activation was successful
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
log_message "INFO" "Conda environment xtts activated successfully." log_message "INFO" "Successfully activated Conda environment: xtts ."
else else
log_message "ERROR" "${red_fg_strong}Failed to activate Conda environment: xtts${reset}" log_message "ERROR" "${red_fg_strong}Failed to activate Conda environment: xtts${reset}"
log_message "INFO" "Press Enter to try again otherwise close the installer and restart." log_message "INFO" "Press Enter to try again otherwise close the installer and restart."
@@ -444,10 +421,6 @@ install_xtts() {
install_xtts install_xtts
fi fi
# Install Python 3.10 in the xtts environment
log_message "INFO" "Installing Python in the Conda environment..."
conda install python=3.10 -y
# Create folders for xtts # Create folders for xtts
log_message "INFO" "Creating xtts folders..." log_message "INFO" "Creating xtts folders..."
mkdir "$PWD/xtts" mkdir "$PWD/xtts"
@@ -470,23 +443,43 @@ install_xtts() {
pip3 install pydub pip3 install pydub
pip3 install stream2sentence pip3 install stream2sentence
# Use the GPU choice made earlier to set the correct PyTorch index-url
# Use the GPU choice made earlier to install requirements for XTTS
if [ "$GPU_CHOICE" == "1" ]; then if [ "$GPU_CHOICE" == "1" ]; then
log_message "INFO" "Installing NVIDIA version of PyTorch" log_message "INFO" "Installing NVIDIA version of PyTorch"
pip3 install torch==2.1.1+cu118 torchvision torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118 pip3 install torch==2.1.1+cu118 torchvision torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118
install_st_extras_post install_all_post
elif [ "$GPU_CHOICE" == "2" ]; then elif [ "$GPU_CHOICE" == "2" ]; then
log_message "INFO" "Installing AMD version of PyTorch" log_message "INFO" "Installing AMD version of PyTorch"
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6
install_st_extras_post install_all_post
elif [ "$GPU_CHOICE" == "3" ]; then elif [ "$GPU_CHOICE" == "3" ]; then
log_message "INFO" "Installing CPU-only version of PyTorch" log_message "INFO" "Installing CPU-only version of PyTorch"
pip3 install torch torchvision torchaudio pip3 install torch torchvision torchaudio
install_st_extras_post install_all_post
fi fi
} }
# End of install script for XTTS
install_all_post() {
# Create a Conda environment named extras
log_message "INFO" "Creating Conda environment: extras"
conda create -n extras python=3.11 git -y
log_message "INFO" "Activating Conda environment: extras"
conda activate extras
# Check if extras activation was successful
if [ $? -eq 0 ]; then
log_message "INFO" "Conda environment extras activated successfully."
else
log_message "ERROR" "${red_fg_strong}Failed to activate Conda environment: extras${reset}"
log_message "INFO" "Press Enter to try again otherwise close the installer and restart."
read -p "Press Enter to try again..."
install_all_pre
fi
install_st_extras_post() {
# Activate the extras environment # Activate the extras environment
log_message "INFO" "Activating Conda environment extras..." log_message "INFO" "Activating Conda environment extras..."
conda activate extras conda activate extras
@@ -494,36 +487,32 @@ install_st_extras_post() {
# Navigate to the SillyTavern-extras directory # Navigate to the SillyTavern-extras directory
cd "$PWD/SillyTavern-extras" cd "$PWD/SillyTavern-extras"
log_message "INFO" "Installing pip requirements from requirements-rvc.txt in conda enviroment: extras"
pip3 install -r requirements-rvc.txt
pip3 install tensorboardX
log_message "INFO" "${green_fg_strong}SillyTavern + Extras successfully installed.${reset}"
# Use the GPU choice made earlier to install requirements for extras # Use the GPU choice made earlier to install requirements for extras
if [ "$GPU_CHOICE" == "1" ]; then if [ "$GPU_CHOICE" == "1" ]; then
log_message "INFO" "Installing modules for NVIDIA from requirements.txt in extras" log_message "INFO" "Installing modules for NVIDIA from requirements.txt in extras"
pip3 install -r requirements.txt pip3 install -r requirements.txt
conda install -c conda-forge faiss-gpu -y conda install -c conda-forge faiss-gpu -y
install_st_extras_post install_all_final
elif [ "$GPU_CHOICE" == "2" ]; then elif [ "$GPU_CHOICE" == "2" ]; then
log_message "INFO" "Installing modules for AMD from requirements-rocm.txt in extras" log_message "INFO" "Installing modules for AMD from requirements-rocm.txt in extras"
pip3 install -r requirements-rocm.txt pip3 install -r requirements-rocm.txt
install_st_extras_post install_all_final
elif [ "$GPU_CHOICE" == "3" ]; then elif [ "$GPU_CHOICE" == "3" ]; then
log_message "INFO" "Installing modules for CPU from requirements-silicon.txt in extras" log_message "INFO" "Installing modules for CPU from requirements-silicon.txt in extras"
pip3 install -r requirements-silicon.txt pip3 install -r requirements-silicon.txt
install_st_extras_post install_all_final
fi fi
}
# Install Python 3.11 and Git in the extras environment install_all_final() {
log_message "INFO" "Installing Python and Git in the Conda environment..." # Ask if the user wants to create a shortcut
conda install python=3.11 git -y
log_message "INFO" "Installing pip3 requirements-rvc in extras environment..."
pip3 install -r requirements-rvc.txt
pip3 install tensorboardX
# Cleanup the Downloaded file
rm -rf /tmp/$miniconda_installer
log_message "INFO" "${green_fg_strong}SillyTavern + Extras successfully installed.${reset}"
# Ask if the user wants to create a desktop shortcut
read -p "Do you want to create a shortcut on the desktop? [Y/n] " create_shortcut read -p "Do you want to create a shortcut on the desktop? [Y/n] " create_shortcut
if [[ "${create_shortcut}" == "Y" || "${create_shortcut}" == "y" ]]; then if [[ "${create_shortcut}" == "Y" || "${create_shortcut}" == "y" ]]; then
@@ -555,6 +544,7 @@ install_st_extras_post() {
installer installer
} }
# Function to install SillyTavern # Function to install SillyTavern
install_sillytavern() { install_sillytavern() {
echo -e "\033]0;SillyTavern [INSTALL-ST]\007" echo -e "\033]0;SillyTavern [INSTALL-ST]\007"
@@ -629,7 +619,7 @@ install_extras() {
echo "" echo ""
# Prompt for GPU choice # Prompt for GPU choice
read -p "Enter the number corresponding to your GPU: " gpu_choice read -p "Enter number corresponding to your GPU: " gpu_choice
# GPU menu - Backend # GPU menu - Backend
# Set the GPU choice in an environment variable for choice callback # Set the GPU choice in an environment variable for choice callback
@@ -654,33 +644,16 @@ install_extras() {
fi fi
} }
# Function to install_extras_pre
install_extras_pre() { install_extras_pre() {
log_message "INFO" "Installing Extras..." log_message "INFO" "Installing Extras..."
log_message "INFO" "Cloning SillyTavern-extras repository..." log_message "INFO" "Cloning SillyTavern-extras repository..."
git clone https://github.com/SillyTavern/SillyTavern-extras.git git clone https://github.com/SillyTavern/SillyTavern-extras.git
# Download the Miniconda installer script
wget https://repo.anaconda.com/miniconda/$miniconda_installer -P /tmp
chmod +x /tmp/$miniconda_installer
# Run the installer script
bash /tmp/$miniconda_installer -b -u -p $CONDA_PATH
# Update PATH to include Miniconda
export PATH="$CONDA_PATH/bin:$PATH"
# Activate Conda environment
log_message "INFO" "Activating Miniconda environment..."
source $CONDA_PATH/etc/profile.d/conda.sh
# Create and activate the Conda environment
log_message "INFO" "Disabling conda auto activate..."
conda config --set auto_activate_base false
conda init bash
log_message "INFO" "Creating Conda environment extras..." log_message "INFO" "Creating Conda environment extras..."
conda create -n extras -y conda create -n extras python=3.11 git -y
log_message "INFO" "Activating Conda environment extras..." log_message "INFO" "Activating Conda environment extras..."
conda activate extras conda activate extras
@@ -695,92 +668,22 @@ install_extras_pre() {
install_extras_pre install_extras_pre
fi fi
log_message "INFO" "Installing Python and Git in the Conda environment..." # Use the GPU choice made earlier to install requirements for XTTS
conda install python=3.11 git -y if [ "$GPU_CHOICE" == "1" ]; then
log_message "INFO" "Installing NVIDIA version of PyTorch"
# Provide a link to XTTS pip3 install torch==2.1.1+cu118 torchvision torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118
log_message "INFO" "${blue_fg_strong}Feeling excited to give your robotic waifu/husbando a new shiny voice modulator?${reset}" install_extras_post
log_message "INFO" "${blue_fg_strong}To learn more about XTTS, visit:${reset} https://coqui.ai/blog/tts/open_xtts" elif [ "$GPU_CHOICE" == "2" ]; then
log_message "INFO" "Installing AMD version of PyTorch"
# Ask the user if they want to install XTTS pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6
read -p "Install XTTS? [Y/N]: " install_xtts_requirements install_extras_post
elif [ "$GPU_CHOICE" == "3" ]; then
# Check the user's response log_message "INFO" "Installing CPU-only version of PyTorch"
if [[ "$install_xtts_requirements" == "Y" || "$install_xtts_requirements" == "y" ]]; then pip3 install torch torchvision torchaudio
install_xtts install_extras_post
else fi
log_message "INFO" "XTTS installation skipped."
install_extras_post
fi
} }
# Function to install_xtts
install_xtts() {
log_message "INFO" "Installing XTTS..."
# Activate the Miniconda installation
log_message "INFO" "Activating Miniconda environment..."
source "$miniconda_path/bin/activate"
# Create a Conda environment named xtts
log_message "INFO" "Creating Conda environment xtts..."
conda create -n xtts -y
# Activate the xtts environment
log_message "INFO" "Activating Conda environment xtts..."
conda activate xtts
# Check if activation was successful
if [ $? -eq 0 ]; then
log_message "INFO" "Conda environment xtts activated successfully."
else
log_message "ERROR" "${red_fg_strong}Failed to activate Conda environment: xtts${reset}"
log_message "INFO" "Press Enter to try again otherwise close the installer and restart."
read -p "Press Enter to try again..."
install_xtts
fi
# Install Python 3.10 in the xtts environment
log_message "INFO" "Installing Python in the Conda environment..."
conda install python=3.10 -y
# Create folders for xtts
log_message "INFO" "Creating xtts folders..."
mkdir "$PWD/xtts"
mkdir "$PWD/xtts/speakers"
mkdir "$PWD/xtts/output"
# Clone the xtts-api-server repository for voice examples
log_message "INFO" "Cloning xtts-api-server repository..."
git clone https://github.com/daswer123/xtts-api-server.git
log_message "INFO" "Adding voice examples to speakers directory..."
cp -r "$PWD/xtts-api-server/example/"* "$PWD/xtts/speakers/"
log_message "INFO" "Removing the xtts-api-server directory..."
rm -rf "$PWD/xtts-api-server"
# Install pip3 requirements
log_message "INFO" "Installing pip3 requirements for xtts..."
pip3 install xtts-api-server
pip3 install pydub
pip3 install stream2sentence
# Use the GPU choice made earlier to set the correct PyTorch index-url
if [ "$GPU_CHOICE" == "1" ]; then
log_message "INFO" "Installing NVIDIA version of PyTorch"
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
install_extras_post
elif [ "$GPU_CHOICE" == "2" ]; then
log_message "INFO" "Installing AMD version of PyTorch"
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6
install_extras_post
elif [ "$GPU_CHOICE" == "3" ]; then
log_message "INFO" "Installing CPU-only version of PyTorch"
pip3 install torch torchvision torchaudio
install_extras_post
fi
}
install_extras_post() { install_extras_post() {
# Activate the extras environment # Activate the extras environment
@@ -814,24 +717,78 @@ install_extras_post() {
pip3 install -r requirements-rvc.txt pip3 install -r requirements-rvc.txt
pip3 install tensorboardX pip3 install tensorboardX
# Cleanup the Downloaded file
rm -rf /tmp/$miniconda_installer
log_message "INFO" "${green_fg_strong}SillyTavern + Extras successfully installed.${reset}" log_message "INFO" "${green_fg_strong}SillyTavern + Extras successfully installed.${reset}"
installer installer
} }
# Installer Menu - Frontend
# Function to install XTTS
install_xtts() {
log_message "INFO" "Installing XTTS..."
# Activate the Miniconda installation
log_message "INFO" "Activating Miniconda environment..."
source "$miniconda_path/bin/activate"
# Create a Conda environment named xtts
log_message "INFO" "Creating Conda environment xtts..."
conda create -n xtts python=3.10 git -y
# Activate the xtts environment
log_message "INFO" "Activating Conda environment xtts..."
conda activate xtts
# Check if activation was successful
if [ $? -eq 0 ]; then
log_message "INFO" "Conda environment xtts activated successfully."
else
log_message "ERROR" "${red_fg_strong}Failed to activate Conda environment: xtts${reset}"
log_message "INFO" "Press Enter to try again otherwise close the installer and restart."
read -p "Press Enter to try again..."
install_xtts
fi
# Create folders for xtts
log_message "INFO" "Creating xtts folders..."
mkdir "$PWD/xtts"
mkdir "$PWD/xtts/speakers"
mkdir "$PWD/xtts/output"
# Clone the xtts-api-server repository for voice examples
log_message "INFO" "Cloning xtts-api-server repository..."
git clone https://github.com/daswer123/xtts-api-server.git
log_message "INFO" "Adding voice examples to speakers directory..."
cp -r "$PWD/xtts-api-server/example/"* "$PWD/xtts/speakers/"
log_message "INFO" "Removing the xtts-api-server directory..."
rm -rf "$PWD/xtts-api-server"
# Install pip3 requirements
log_message "INFO" "Installing pip3 requirements for xtts..."
pip3 install xtts-api-server
pip3 install pydub
pip3 install stream2sentence
installer
}
############################################################
################# INSTALLER - FRONTEND #####################
############################################################
installer() { installer() {
echo -e "\033]0;SillyTavern [INSTALLER]\007" echo -e "\033]0;SillyTavern [INSTALLER]\007"
clear clear
echo -e "${blue_fg_strong}/ Installer${reset}" echo -e "${blue_fg_strong}/ Installer${reset}"
echo "-------------------------------------" echo "-------------------------------------"
echo "What would you like to do?" echo "What would you like to do?"
echo "1. Install SillyTavern + Extras" echo "1. Install SillyTavern + Extras + XTTS"
echo "2. Install SillyTavern" echo "2. Install SillyTavern"
echo "3. Install Extras" echo "3. Install Extras"
echo "4. Support" echo "4. Install XTTS"
echo "5. Support"
echo "0. Exit" echo "0. Exit"
read -p "Choose Your Destiny (default is 1): " choice read -p "Choose Your Destiny (default is 1): " choice
@@ -841,12 +798,13 @@ installer() {
choice=1 choice=1
fi fi
# Installer Menu - Backend ################# INSTALLER - BACKEND #####################
case $choice in case $choice in
1) install_st_extras ;; 1) install_all ;;
2) install_sillytavern ;; 2) install_sillytavern ;;
3) install_extras ;; 3) install_extras ;;
4) support ;; 4) install_xtts ;;
5) support ;;
0) exit ;; 0) exit ;;
*) echo -e "${yellow_fg_strong}WARNING: Invalid number. Please insert a valid number.${reset}" *) echo -e "${yellow_fg_strong}WARNING: Invalid number. Please insert a valid number.${reset}"
read -p "Press Enter to continue..." read -p "Press Enter to continue..."
@@ -935,50 +893,60 @@ if [ -n "$IS_MACOS" ]; then
# macOS # macOS
install_git install_git
install_nodejs_npm install_nodejs_npm
install_miniconda
installer installer
elif command -v apt-get &>/dev/null; then elif command -v apt-get &>/dev/null; then
log_message "INFO" "${blue_fg_strong}Detected Debian/Ubuntu-based system.${reset}" log_message "INFO" "${blue_fg_strong}Detected Debian/Ubuntu-based system.${reset}"
# Debian/Ubuntu # Debian/Ubuntu
install_git install_git
install_nodejs_npm install_nodejs_npm
install_miniconda
installer installer
elif command -v yum &>/dev/null; then elif command -v yum &>/dev/null; then
log_message "INFO" "${blue_fg_strong}Detected Red Hat/Fedora-based system.${reset}" log_message "INFO" "${blue_fg_strong}Detected Red Hat/Fedora-based system.${reset}"
# Red Hat/Fedora # Red Hat/Fedora
install_git install_git
install_nodejs_npm install_nodejs_npm
install_miniconda
installer installer
elif command -v apk &>/dev/null; then elif command -v apk &>/dev/null; then
log_message "INFO" "${blue_fg_strong}Detected Alpine Linux-based system.${reset}" log_message "INFO" "${blue_fg_strong}Detected Alpine Linux-based system.${reset}"
# Alpine Linux # Alpine Linux
install_git install_git
install_nodejs_npm install_nodejs_npm
install_miniconda
installer installer
elif command -v pacman &>/dev/null; then elif command -v pacman &>/dev/null; then
log_message "INFO" "${blue_fg_strong}Detected Arch Linux-based system.${reset}" log_message "INFO" "${blue_fg_strong}Detected Arch Linux-based system.${reset}"
# Arch Linux # Arch Linux
install_git install_git
install_nodejs_npm install_nodejs_npm
install_miniconda
installer installer
elif command -v emerge &>/dev/null; then elif command -v emerge &>/dev/null; then
log_message "INFO" "${blue_fg_strong}Detected Gentoo Linux-based system. Now you are the real CHAD${reset}" log_message "INFO" "${blue_fg_strong}Detected Gentoo Linux-based system. Now you are the real CHAD${reset}"
# Gentoo Linux # Gentoo Linux
install_git install_git
install_nodejs_npm install_nodejs_npm
install_miniconda
installer installer
elif command -v pkg &>/dev/null; then elif command -v pkg &>/dev/null; then
log_message "INFO" "${blue_fg_strong}Detected pkg System${reset}" log_message "INFO" "${blue_fg_strong}Detected pkg System${reset}"
# pkg # pkg
install_git install_git
install_nodejs_npm install_nodejs_npm
install_miniconda
installer installer
elif command -v zypper &>/dev/null; then elif command -v zypper &>/dev/null; then
log_message "INFO" "${blue_fg_strong}Detected openSUSE system.${reset}" log_message "INFO" "${blue_fg_strong}Detected openSUSE system.${reset}"
# openSUSE # openSUSE
install_git install_git
install_nodejs_npm install_nodejs_npm
install_miniconda
installer installer
else else
log_message "ERROR" "${red_fg_strong}Unsupported package manager. Cannot detect Linux distribution.${reset}" log_message "ERROR" "${red_fg_strong}Unsupported package manager. Cannot detect Linux distribution.${reset}"
exit 1 exit 1
fi fi

View File

@@ -157,9 +157,9 @@ if not defined choice set "choice=1"
REM Installer menu - Backend REM Installer menu - Backend
if "%choice%"=="1" ( if "%choice%"=="1" (
call :install_st_extras call :install_all
) else if "%choice%"=="2" ( ) else if "%choice%"=="2" (
call :install_sillytavern call :install_sillytavern
) else if "%choice%"=="3" ( ) else if "%choice%"=="3" (
call :install_extras call :install_extras
) else if "%choice%"=="4" ( ) else if "%choice%"=="4" (
@@ -175,7 +175,7 @@ if "%choice%"=="1" (
) )
:install_st_extras :install_all
title SillyTavern [INSTALL SILLYTAVERN + EXTRAS + XTTS] title SillyTavern [INSTALL SILLYTAVERN + EXTRAS + XTTS]
cls cls
echo %blue_fg_strong%/ Installer / Install SillyTavern + Extras + XTTS%reset% echo %blue_fg_strong%/ Installer / Install SillyTavern + Extras + XTTS%reset%
@@ -214,22 +214,22 @@ REM Check the user's response
if "%gpu_choice%"=="1" ( if "%gpu_choice%"=="1" (
REM Install pip requirements REM Install pip requirements
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% GPU choice set to NVIDIA echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% GPU choice set to NVIDIA
goto :install_st_extras_pre goto :install_all_pre
) else if "%gpu_choice%"=="2" ( ) else if "%gpu_choice%"=="2" (
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% GPU choice set to AMD echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% GPU choice set to AMD
goto :install_st_extras_pre goto :install_all_pre
) else if "%gpu_choice%"=="3" ( ) else if "%gpu_choice%"=="3" (
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Using CPU-only mode echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Using CPU-only mode
goto :install_st_extras_pre goto :install_all_pre
) else if "%gpu_choice%"=="0" ( ) else if "%gpu_choice%"=="0" (
goto :installer goto :installer
) else ( ) else (
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Invalid number. Please enter a valid number.%reset% echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Invalid number. Please enter a valid number.%reset%
pause pause
goto :install_st_extras goto :install_all
) )
:install_st_extras_pre :install_all_pre
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing SillyTavern + Extras + XTTS... echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing SillyTavern + Extras + XTTS...
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing SillyTavern... echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing SillyTavern...
@@ -271,7 +271,7 @@ REM Install script for XTTS
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Conda environment: %cyan_fg_strong%xtts%reset% echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Conda environment: %cyan_fg_strong%xtts%reset%
call conda activate xtts call conda activate xtts
REM Use the GPU choice made earlier to set the correct PyTorch index-url REM Use the GPU choice made earlier to install requirements for XTTS
if "%GPU_CHOICE%"=="1" ( if "%GPU_CHOICE%"=="1" (
echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[xtts]%reset% %blue_fg_strong%[INFO]%reset% Installing NVIDIA version of PyTorch in conda enviroment: %cyan_fg_strong%xtts%reset% echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[xtts]%reset% %blue_fg_strong%[INFO]%reset% Installing NVIDIA version of PyTorch in conda enviroment: %cyan_fg_strong%xtts%reset%
pip install torch==2.1.1+cu118 torchvision torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118 pip install torch==2.1.1+cu118 torchvision torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118
@@ -286,13 +286,13 @@ REM Install script for XTTS
goto :install_st_xtts goto :install_st_xtts
) )
:install_st_xtts
REM Install pip requirements REM Install pip requirements
echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[xtts]%reset% %blue_fg_strong%[INFO]%reset% Installing pip requirements in conda enviroment: %cyan_fg_strong%xtts%reset% echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[xtts]%reset% %blue_fg_strong%[INFO]%reset% Installing pip requirements in conda enviroment: %cyan_fg_strong%xtts%reset%
pip install xtts-api-server pip install xtts-api-server
pip install pydub pip install pydub
pip install stream2sentence pip install stream2sentence
:install_st_xtts
REM Create folders for xtts REM Create folders for xtts
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Creating xtts folders... echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Creating xtts folders...
mkdir "%~dp0xtts" mkdir "%~dp0xtts"
@@ -328,18 +328,18 @@ if "%GPU_CHOICE%"=="1" (
echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[extras]%reset% %blue_fg_strong%[INFO]%reset% Installing modules for NVIDIA from requirements.txt in conda enviroment: %cyan_fg_strong%extras%reset% echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[extras]%reset% %blue_fg_strong%[INFO]%reset% Installing modules for NVIDIA from requirements.txt in conda enviroment: %cyan_fg_strong%extras%reset%
call conda install -c conda-forge faiss-gpu -y call conda install -c conda-forge faiss-gpu -y
pip install -r requirements.txt pip install -r requirements.txt
goto :install_st_extras_post goto :install_all_post
) else if "%GPU_CHOICE%"=="2" ( ) else if "%GPU_CHOICE%"=="2" (
echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[extras]%reset% %blue_fg_strong%[INFO]%reset% Installing modules for AMD from requirements-rocm.txt in conda enviroment: %cyan_fg_strong%extras%reset% echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[extras]%reset% %blue_fg_strong%[INFO]%reset% Installing modules for AMD from requirements-rocm.txt in conda enviroment: %cyan_fg_strong%extras%reset%
pip install -r requirements-rocm.txt pip install -r requirements-rocm.txt
goto :install_st_extras_post goto :install_all_post
) else if "%GPU_CHOICE%"=="3" ( ) else if "%GPU_CHOICE%"=="3" (
echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[extras]%reset% %blue_fg_strong%[INFO]%reset% Installing modules for CPU from requirements-silicon.txt in conda enviroment: %cyan_fg_strong%extras%reset% echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[extras]%reset% %blue_fg_strong%[INFO]%reset% Installing modules for CPU from requirements-silicon.txt in conda enviroment: %cyan_fg_strong%extras%reset%
pip install -r requirements-silicon.txt pip install -r requirements-silicon.txt
goto :install_st_extras_post goto :install_all_post
) )
:install_st_extras_post :install_all_post
echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[extras]%reset% %blue_fg_strong%[INFO]%reset% Installing pip requirements from requirements-rvc.txt in conda enviroment: %cyan_fg_strong%extras%reset% echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[extras]%reset% %blue_fg_strong%[INFO]%reset% Installing pip requirements from requirements-rvc.txt in conda enviroment: %cyan_fg_strong%extras%reset%
pip install -r requirements-rvc.txt pip install -r requirements-rvc.txt
pip install tensorboardX pip install tensorboardX
@@ -674,7 +674,7 @@ REM Activate the xtts environment
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Conda environment: %cyan_fg_strong%xtts%reset% echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Conda environment: %cyan_fg_strong%xtts%reset%
call conda activate xtts call conda activate xtts
REM Use the GPU choice made earlier to set the correct PyTorch index-url REM Use the GPU choice made earlier to install requirements for XTTS
if "%GPU_CHOICE%"=="1" ( if "%GPU_CHOICE%"=="1" (
echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[xtts]%reset% %blue_fg_strong%[INFO]%reset% Installing NVIDIA version of PyTorch in conda enviroment: %cyan_fg_strong%xtts%reset% echo %blue_bg%[%time%]%reset% %cyan_fg_strong%[xtts]%reset% %blue_fg_strong%[INFO]%reset% Installing NVIDIA version of PyTorch in conda enviroment: %cyan_fg_strong%xtts%reset%
pip install torch==2.1.1+cu118 torchvision torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118 pip install torch==2.1.1+cu118 torchvision torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118

File diff suppressed because it is too large Load Diff