From 026cc8b96211b833e187810f3321cea866a301ed Mon Sep 17 00:00:00 2001 From: deffcolony <61471128+deffcolony@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:04:56 +0100 Subject: [PATCH] hotfix for launching extras +fixed the start_command not found +added requirements for RVC --- Launcher.bat | 13 ++++++------- install.sh | 6 ++++++ installer.bat | 6 ++++++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Launcher.bat b/Launcher.bat index f286f07..7ed25e0 100644 --- a/Launcher.bat +++ b/Launcher.bat @@ -212,7 +212,7 @@ echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Extras launched in a REM read modules.txt and find the start_command line for /F "tokens=*" %%a in ('findstr /I "start_command=" %modules_path%') do ( - set start_command=%%a +set %%a ) set start_command=%start_command:start_command=% @@ -243,11 +243,9 @@ call conda activate extras REM Start SillyTavern Extras with desired configurations echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Extras launched in a new window. -@REM echo "Getting start command from modules.txt" - REM read modules.txt and find the start_command line for /F "tokens=*" %%a in ('findstr /I "start_command=" %modules_path%') do ( - set start_command=%%a +set %%a ) set start_command=%start_command:start_command=% @@ -723,9 +721,9 @@ echo Choose extras modules to enable or disable (e.g., "1 2 4" to enable Cuda, R REM color 7 REM Display module options with colors based on their status -call :printModule "1. Cuda (--gpu 0 --cuda --cuda-device=0)" %cuda_trigger% +call :printModule "1. Cuda (--cuda)" %cuda_trigger% call :printModule "2. RVC (--enable-modules=rvc --rvc-save-file --max-content-length=1000)" %rvc_trigger% -call :printModule "3. talkinghead (--enable-modules=talkinghead)" %talkinghead_trigger% +call :printModule "3. talkinghead (--enable-modules=talkinghead --talkinghead-gpu)" %talkinghead_trigger% call :printModule "4. caption (--enable-modules=caption)" %caption_trigger% call :printModule "5. summarize (--enable-modules=summarize)" %summarize_trigger% call :printModule "6. listen (--listen)" %listen_trigger% @@ -800,13 +798,14 @@ if "%listen_trigger%"=="true" ( set "python_command=%python_command% --listen" ) if "%cuda_trigger%"=="true" ( - set "python_command=%python_command% --gpu 0 --cuda --cuda-device=0 " + set "python_command=%python_command% --cuda" ) if "%rvc_trigger%"=="true" ( set "python_command=%python_command% --rvc-save-file --max-content-length=1000" set "modules_enable=%modules_enable%rvc," ) if "%talkinghead_trigger%"=="true" ( + set "python_command=%python_command% --talkinghead-gpu" set "modules_enable=%modules_enable%talkinghead," ) if "%caption_trigger%"=="true" ( diff --git a/install.sh b/install.sh index 735c145..06083c7 100755 --- a/install.sh +++ b/install.sh @@ -374,6 +374,7 @@ install_st_extras() { # Install pip requirements log_message "INFO" "Installing pip requirements for xtts..." pip install xtts-api-server + pip install pydub pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 # Create folders for xtts @@ -431,6 +432,7 @@ install_st_extras() { # Install pip requirements log_message "INFO" "Installing modules from requirements.txt in extras..." pip install -r requirements.txt + conda install -c conda-forge faiss-gpu -y elif [ "$gpu_choice" == "2" ]; then log_message "INFO" "Installing modules from requirements-rocm.txt in extras..." pip install -r requirements-rocm.txt @@ -444,6 +446,7 @@ install_st_extras() { log_message "INFO" "Installing pip requirements-rvc in extras environment..." pip install -r requirements-rvc.txt + pip install tensorboardX # Cleanup the Downloaded file rm -rf /tmp/$miniconda_installer @@ -605,6 +608,7 @@ install_extras() { # Install pip requirements log_message "INFO" "Installing pip requirements for xtts..." pip install xtts-api-server + pip install pydub pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 # Create folders for xtts @@ -662,6 +666,7 @@ install_extras() { # Install pip requirements log_message "INFO" "Installing modules from requirements.txt in extras..." pip install -r requirements.txt + conda install -c conda-forge faiss-gpu -y elif [ "$gpu_choice" == "2" ]; then log_message "INFO" "Installing modules from requirements-rocm.txt in extras..." pip install -r requirements-rocm.txt @@ -675,6 +680,7 @@ install_extras() { log_message "INFO" "Installing pip requirements-rvc in extras environment..." pip install -r requirements-rvc.txt + pip install tensorboardX # Cleanup the Downloaded file rm -rf /tmp/$miniconda_installer diff --git a/installer.bat b/installer.bat index fb33e37..d0bc696 100644 --- a/installer.bat +++ b/installer.bat @@ -247,6 +247,7 @@ if /i "%install_xtts_requirements%"=="Y" ( REM Install pip requirements echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing pip requirements for xtts... pip install xtts-api-server + pip install pydub pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 REM Create folders for xtts @@ -305,6 +306,7 @@ if "%gpu_choice%"=="1" ( REM Install pip requirements echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing modules from requirements.txt in extras pip install -r requirements.txt + call conda install -c conda-forge faiss-gpu -y ) else if "%gpu_choice%"=="2" ( echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing modules from requirements-rocm.txt in extras pip install -r requirements-rocm.txt @@ -320,6 +322,7 @@ if "%gpu_choice%"=="1" ( echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing pip requirements-rvc in extras environment... pip install -r requirements-rvc.txt +pip install tensorboardX echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Extras installed successfully.%reset% @@ -334,6 +337,7 @@ if /i "%create_shortcut%"=="Y" ( "$WshShell = New-Object -ComObject WScript.Shell; " ^ "$Shortcut = $WshShell.CreateShortcut('%desktopPath%\%shortcutName%'); " ^ "$Shortcut.TargetPath = '%shortcutTarget%'; " ^ + "$Shortcut.IconLocation = '%iconFile%'; " ^ "$Shortcut.WorkingDirectory = '%startIn%'; " ^ "$Shortcut.Description = '%comment%'; " ^ "$Shortcut.Save()" @@ -548,6 +552,7 @@ if "%gpu_choice%"=="1" ( REM Install pip requirements echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing modules from requirements.txt in extras pip install -r requirements.txt + call conda install -c conda-forge faiss-gpu -y ) else if "%gpu_choice%"=="2" ( echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing modules from requirements-rocm.txt in extras pip install -r requirements-rocm.txt @@ -563,6 +568,7 @@ if "%gpu_choice%"=="1" ( echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing pip requirements-rvc in extras environment... pip install -r requirements-rvc.txt +pip install tensorboardX echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Extras installed successfully.%reset%