diff --git a/Launcher.bat b/Launcher.bat index 2f4de54..542511d 100644 --- a/Launcher.bat +++ b/Launcher.bat @@ -13,7 +13,7 @@ REM Issues: https://github.com/SillyTavern/SillyTavern-Launcher/issues title STL [STARTUP CHECK] setlocal -set "stl_version=V1.2.1" +set "stl_version=1.2.1" set "stl_title_pid=STL [TROUBLESHOOTING]" REM ANSI Escape Code for Colors @@ -153,6 +153,12 @@ set "app_uninstaller_text_completion_dir=%functions_dir%\Toolbox\App_Uninstaller set "app_uninstaller_voice_generation_dir=%functions_dir%\Toolbox\App_Uninstaller\Voice_Generation" set "app_uninstaller_core_utilities_dir=%functions_dir%\Toolbox\App_Uninstaller\Core_Utilities" +REM Define variables for the directories for Editor +set "editor_image_generation_dir=%functions_dir%\Toolbox\Editor\Image_Generation" +set "editor_text_completion_dir=%functions_dir%\Toolbox\Editor\Text_Completion" +set "editor_voice_generation_dir=%functions_dir%\Toolbox\Editor\Voice_Generation" +set "editor_core_utilities_dir=%functions_dir%\Toolbox\Editor\Core_Utilities" + REM Define variables for logging set "logs_stl_console_path=%log_dir%\stl.log" set "logs_st_console_path=%log_dir%\st_console_output.log" @@ -1200,7 +1206,18 @@ if not defined ooba_start_command ( echo. echo %blue_bg%We will redirect you to the Edit OOBA Modules menu.%reset% pause - goto :edit_ooba_modules + set "caller=editor_text_completion" + if exist "%editor_text_completion_dir%\edit_ooba_modules.bat" ( + call %editor_text_completion_dir%\edit_ooba_modules.bat + goto :app_launcher_text_completion + ) else ( + echo [%DATE% %TIME%] ERROR: edit_ooba_modules.bat not found in: %editor_text_completion_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_ooba_modules.bat not found in: %editor_text_completion_dir%%reset% + echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Automatic Repair... + git pull + pause + goto :app_launcher_text_completion + ) ) set "ooba_start_command=%ooba_start_command:ooba_start_command=%" @@ -3035,16 +3052,49 @@ echo 2. Edit koboldcpp echo 3. Edit TabbyAPI echo 0. Back -set /p editor_txt_comp_choice=Choose Your Destiny: +set /p editor_text_completion_choice=Choose Your Destiny: REM ####### EDITOR TEXT COMPLETION - BACKEND ########## -if "%editor_txt_comp_choice%"=="1" ( - call :edit_ooba -) else if "%editor_txt_comp_choice%"=="2" ( - call :edit_koboldcpp -) else if "%editor_txt_comp_choice%"=="3" ( - call :edit_tabbyapi -) else if "%editor_txt_comp_choice%"=="0" ( +if "%editor_text_completion_choice%"=="1" ( + set "caller=editor_text_completion" + if exist "%editor_text_completion_dir%\edit_ooba_modules.bat" ( + call %editor_text_completion_dir%\edit_ooba_modules.bat + goto :editor_text_completion + ) else ( + echo [%DATE% %TIME%] ERROR: edit_ooba_modules.bat not found in: %editor_text_completion_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_ooba_modules.bat not found in: %editor_text_completion_dir%%reset% + echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Automatic Repair... + git pull + pause + goto :editor_text_completion + ) +) else if "%editor_text_completion_choice%"=="2" ( + set "caller=editor_text_completion" + if exist "%editor_text_completion_dir%\edit_ooba_modules.bat" ( + call %editor_text_completion_dir%\edit_ooba_modules.bat + goto :editor_text_completion + ) else ( + echo [%DATE% %TIME%] ERROR: edit_ooba_modules.bat not found in: %editor_text_completion_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_ooba_modules.bat not found in: %editor_text_completion_dir%%reset% + echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Automatic Repair... + git pull + pause + goto :editor_text_completion + ) +) else if "%editor_text_completion_choice%"=="3" ( + set "caller=editor_text_completion" + if exist "%editor_text_completion_dir%\edit_ooba_modules.bat" ( + call %editor_text_completion_dir%\edit_ooba_modules.bat + goto :editor_text_completion + ) else ( + echo [%DATE% %TIME%] ERROR: edit_ooba_modules.bat not found in: %editor_text_completion_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_ooba_modules.bat not found in: %editor_text_completion_dir%%reset% + echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Automatic Repair... + git pull + pause + goto :editor_text_completion + ) +) else if "%editor_text_completion_choice%"=="0" ( goto :editor ) else ( echo [%DATE% %TIME%] %log_invalidinput% >> %logs_stl_console_path% @@ -3053,160 +3103,6 @@ if "%editor_txt_comp_choice%"=="1" ( goto :editor_text_completion ) -REM ################################################################################################################################################## -REM ################################################################################################################################################## -REM ################################################################################################################################################## - -REM ############################################################ -REM ############## EDIT OOBA MODULES - FRONTEND ################ -REM ############################################################ -:edit_ooba -title STL [EDIT OOBA MODULES] -cls -echo %blue_fg_strong%/ Home / Toolbox / Editor / Text Completion / Edit OOBA Modules%reset% -echo ------------------------------------------------------------- -echo Choose OOBA modules to enable or disable (e.g., "1 2 4" to enable extensions openai, listen, and api-port) - - - -REM Display module options with colors based on their status -call :printModule "1. extensions openai (--extensions openai)" %ooba_extopenai_trigger% -call :printModule "2. listen (--listen)" %ooba_listen_trigger% -call :printModule "3. listen-port (--listen-port 7910)" %ooba_listenport_trigger% -call :printModule "4. api-port (--api-port 7911)" %ooba_apiport_trigger% -call :printModule "5. autolaunch (--autolaunch)" %ooba_autolaunch_trigger% -call :printModule "6. verbose (--verbose)" %ooba_verbose_trigger% - -echo 00. Quick Start Text generation web UI oobabooga -echo 0. Back - -set "python_command=" - -set /p ooba_module_choices=Choose modules to enable/disable: - -REM Handle the user's module choices and construct the Python command -for %%i in (%ooba_module_choices%) do ( - if "%%i"=="1" ( - if "%ooba_extopenai_trigger%"=="true" ( - set "ooba_extopenai_trigger=false" - ) else ( - set "ooba_extopenai_trigger=true" - ) - - ) else if "%%i"=="2" ( - if "%ooba_listen_trigger%"=="true" ( - set "ooba_listen_trigger=false" - ) else ( - set "ooba_listen_trigger=true" - ) - - ) else if "%%i"=="3" ( - if "%ooba_listenport_trigger%"=="true" ( - set "ooba_listenport_trigger=false" - ) else ( - set "ooba_listenport_trigger=true" - ) - - ) else if "%%i"=="4" ( - if "%ooba_apiport_trigger%"=="true" ( - set "ooba_apiport_trigger=false" - ) else ( - set "ooba_apiport_trigger=true" - ) - - ) else if "%%i"=="5" ( - if "%ooba_autolaunch_trigger%"=="true" ( - set "ooba_autolaunch_trigger=false" - ) else ( - set "ooba_autolaunch_trigger=true" - ) - ) else if "%%i"=="6" ( - if "%ooba_verbose_trigger%"=="true" ( - set "ooba_verbose_trigger=false" - ) else ( - set "ooba_verbose_trigger=true" - ) - - ) else if "%%i"=="00" ( - goto :start_ooba - - ) else if "%%i"=="0" ( - goto :editor_text_completion - ) -) - -REM Save the module flags to modules-ooba -echo ooba_extopenai_trigger=%ooba_extopenai_trigger%>%ooba_modules_path% -echo ooba_listen_trigger=%ooba_listen_trigger%>>%ooba_modules_path% -echo ooba_listenport_trigger=%ooba_listenport_trigger%>>%ooba_modules_path% -echo ooba_apiport_trigger=%ooba_apiport_trigger%>>%ooba_modules_path% -echo ooba_autolaunch_trigger=%ooba_autolaunch_trigger%>>%ooba_modules_path% -echo ooba_verbose_trigger=%ooba_verbose_trigger%>>%ooba_modules_path% - - -REM remove modules_enable -set "modules_enable=" - -REM Compile the Python command -set "python_command=start start_windows.bat" -if "%ooba_extopenai_trigger%"=="true" ( - set "python_command=%python_command% --extensions openai" -) -if "%ooba_listen_trigger%"=="true" ( - set "python_command=%python_command% --listen" -) -if "%ooba_listenport_trigger%"=="true" ( - set "python_command=%python_command% --listen-port 7910" -) -if "%ooba_apiport_trigger%"=="true" ( - set "python_command=%python_command% --api-port 7911" -) -if "%ooba_autolaunch_trigger%"=="true" ( - set "python_command=%python_command% --auto-launch" -) -if "%ooba_verbose_trigger%"=="true" ( - set "python_command=%python_command% --verbose" -) - - -REM is modules_enable empty? -if defined modules_enable ( - REM remove last comma - set "modules_enable=%modules_enable:~0,-1%" -) - -REM command completed -if defined modules_enable ( - set "python_command=%python_command% --enable-modules=%modules_enable%" -) - -REM Save the constructed Python command to modules-ooba for testing -echo ooba_start_command=%python_command%>>%ooba_modules_path% -goto :edit_ooba - -REM Function to print module options with color based on their status -:printModule -if "%2"=="true" ( - echo %green_fg_strong%%1 [Enabled]%reset% -) else ( - echo %red_fg_strong%%1 [Disabled]%reset% -) -exit /b - - - -:edit_tabbyapi -echo COMING SOON -pause -goto :editor_text_completion - - -REM ################################################################################################################################################## -REM ################################################################################################################################################## -REM ################################################################################################################################################## - - - REM ############################################################ REM ######## EDITOR VOICE GENERATION - FRONTEND ################ REM ############################################################ @@ -3220,12 +3116,21 @@ echo What would you like to do? echo 1. Edit XTTS Modules echo 0. Back -set /p editor_voice_gen_choice=Choose Your Destiny: +set /p editor_voice_generation_choice=Choose Your Destiny: REM ######## EDITOR VOICE GENERATION - BACKEND ######### -if "%editor_voice_gen_choice%"=="1" ( - call :edit_xtts_modules -) else if "%editor_voice_gen_choice%"=="0" ( +if "%editor_voice_generation_choice%"=="1" ( + set "caller=editor_voice_generation" + if exist "%editor_voice_generation_dir%\edit_xtts_modules.bat" ( + call %editor_voice_generation_dir%\edit_xtts_modules.bat + goto :editor_voice_generation + ) else ( + echo [%DATE% %TIME%] ERROR: edit_xtts_modules.bat not found in: %editor_voice_generation_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_xtts_modules.bat not found in: %editor_voice_generation_dir%%reset% + pause + goto :editor_voice_generation + ) +) else if "%editor_voice_generation_choice%"=="0" ( goto :editor ) else ( echo [%DATE% %TIME%] %log_invalidinput% >> %logs_stl_console_path% @@ -3235,143 +3140,6 @@ if "%editor_voice_gen_choice%"=="1" ( ) -REM ################################################################################################################################################## -REM ################################################################################################################################################## -REM ################################################################################################################################################## - -REM Function to print module options with color based on their status -:printModule -if "%2"=="true" ( - echo %green_fg_strong%%1 [Enabled]%reset% -) else ( - echo %red_fg_strong%%1 [Disabled]%reset% -) -exit /b - - -REM ############################################################ -REM ############## EDIT XTTS MODULES - FRONTEND ################ -REM ############################################################ -:edit_xtts_modules -title STL [EDIT XTTS MODULES] -cls -echo %blue_fg_strong%/ Home / Toolbox / Editor / Edit XTTS Modules%reset% -echo ------------------------------------------------------------- -echo Choose XTTS modules to enable or disable (e.g., "1 2 4" to enable Cuda, hs, and cache) - -REM Display module options with colors based on their status -call :printModule "1. cuda (--device cuda)" %xtts_cuda_trigger% -call :printModule "2. hs (-hs 0.0.0.0)" %xtts_hs_trigger% -call :printModule "3. deepspeed (--deepspeed)" %xtts_deepspeed_trigger% -call :printModule "4. cache (--use-cache)" %xtts_cache_trigger% -call :printModule "5. listen (--listen)" %xtts_listen_trigger% -call :printModule "6. model (--model-source local)" %xtts_model_trigger% -echo 00. Quick Start XTTS -echo 0. Back - -set "python_command=" - -set /p xtts_module_choices=Choose modules to enable/disable: - -REM Handle the user's module choices and construct the Python command -for %%i in (%xtts_module_choices%) do ( - if "%%i"=="1" ( - if "%xtts_cuda_trigger%"=="true" ( - set "xtts_cuda_trigger=false" - ) else ( - set "xtts_cuda_trigger=true" - ) - - ) else if "%%i"=="2" ( - if "%xtts_hs_trigger%"=="true" ( - set "xtts_hs_trigger=false" - ) else ( - set "xtts_hs_trigger=true" - ) - - ) else if "%%i"=="3" ( - if "%xtts_deepspeed_trigger%"=="true" ( - set "xtts_deepspeed_trigger=false" - ) else ( - set "xtts_deepspeed_trigger=true" - ) - - ) else if "%%i"=="4" ( - if "%xtts_cache_trigger%"=="true" ( - set "xtts_cache_trigger=false" - ) else ( - set "xtts_cache_trigger=true" - ) - - ) else if "%%i"=="5" ( - if "%xtts_listen_trigger%"=="true" ( - set "xtts_listen_trigger=false" - ) else ( - set "xtts_listen_trigger=true" - ) - ) else if "%%i"=="6" ( - if "%xtts_model_trigger%"=="true" ( - set "xtts_model_trigger=false" - ) else ( - set "xtts_model_trigger=true" - ) - - ) else if "%%i"=="00" ( - goto :start_xtts - - ) else if "%%i"=="0" ( - goto :editor_voice_generation - ) -) - -REM Save the module flags to modules-xtts -echo xtts_cuda_trigger=%xtts_cuda_trigger%>%xtts_modules_path% -echo xtts_hs_trigger=%xtts_hs_trigger%>>%xtts_modules_path% -echo xtts_deepspeed_trigger=%xtts_deepspeed_trigger%>>%xtts_modules_path% -echo xtts_cache_trigger=%xtts_cache_trigger%>>%xtts_modules_path% -echo xtts_listen_trigger=%xtts_listen_trigger%>>%xtts_modules_path% -echo xtts_model_trigger=%xtts_model_trigger%>>%xtts_modules_path% - -REM remove modules_enable -set "modules_enable=" - -REM Compile the Python command -set "python_command=python -m xtts_api_server" -if "%xtts_cuda_trigger%"=="true" ( - set "python_command=%python_command% --device cuda" -) -if "%xtts_hs_trigger%"=="true" ( - set "python_command=%python_command% -hs 0.0.0.0" -) -if "%xtts_deepspeed_trigger%"=="true" ( - set "python_command=%python_command% --deepspeed" -) -if "%xtts_cache_trigger%"=="true" ( - set "python_command=%python_command% --use-cache" -) -if "%xtts_listen_trigger%"=="true" ( - set "python_command=%python_command% --listen" -) -if "%xtts_model_trigger%"=="true" ( - set "python_command=%python_command% --model-source local" -) - -REM is modules_enable empty? -if defined modules_enable ( - REM remove last comma - set "modules_enable=%modules_enable:~0,-1%" -) - -REM command completed -if defined modules_enable ( - set "python_command=%python_command% --enable-modules=%modules_enable%" -) - -REM Save the constructed Python command to modules-xtts for testing -echo xtts_start_command=%python_command%>>%xtts_modules_path% -goto :edit_xtts_modules - - REM ############################################################ REM ######## EDITOR IMAGE GENERATION - FRONTEND ################ REM ############################################################ @@ -3388,18 +3156,54 @@ echo 3. Edit ComfyUI echo 4. Edit Fooocus echo 0. Back -set /p editor_img_gen_choice=Choose Your Destiny: +set /p editor_image_generation_choice=Choose Your Destiny: REM ######## EDITOR IMAGE GENERATION - BACKEND ######### -if "%editor_img_gen_choice%"=="1" ( - call :edit_sdwebui_modules -) else if "%editor_img_gen_choice%"=="2" ( - goto :edit_sdwebuiforge -) else if "%editor_img_gen_choice%"=="3" ( - goto :edit_comfyui -) else if "%editor_img_gen_choice%"=="4" ( - goto :edit_fooocus -) else if "%editor_img_gen_choice%"=="0" ( +if "%editor_image_generation_choice%"=="1" ( + set "caller=editor_image_generation" + if exist "%editor_image_generation_dir%\edit_sdwebui_modules.bat" ( + call %editor_image_generation_dir%\edit_sdwebui_modules.bat + goto :editor_image_generation + ) else ( + echo [%DATE% %TIME%] ERROR: edit_sdwebui_modules.bat not found in: %editor_image_generation_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_sdwebui_modules.bat not found in: %editor_image_generation_dir%%reset% + pause + goto :editor_image_generation + ) +) else if "%editor_image_generation_choice%"=="2" ( + set "caller=editor_image_generation" + if exist "%editor_image_generation_dir%\edit_sdwebuiforge_modules.bat" ( + call %editor_image_generation_dir%\edit_sdwebuiforge_modules.bat + goto :editor_image_generation + ) else ( + echo [%DATE% %TIME%] ERROR: edit_sdwebuiforge_modules.bat not found in: %editor_image_generation_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_sdwebuiforge_modules.bat not found in: %editor_image_generation_dir%%reset% + pause + goto :editor_image_generation + ) +) else if "%editor_image_generation_choice%"=="3" ( + set "caller=editor_image_generation" + if exist "%editor_image_generation_dir%\edit_comfyui_modules.bat" ( + call %editor_image_generation_dir%\edit_comfyui_modules.bat + goto :editor_image_generation + ) else ( + echo [%DATE% %TIME%] ERROR: edit_comfyui_modules.bat not found in: %editor_image_generation_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_comfyui_modules.bat not found in: %editor_image_generation_dir%%reset% + pause + goto :editor_image_generation + ) +) else if "%editor_image_generation_choice%"=="4" ( + set "caller=editor_image_generation" + if exist "%editor_image_generation_dir%\edit_fooocus_modules.bat" ( + call %editor_image_generation_dir%\edit_fooocus_modules.bat + goto :editor_image_generation + ) else ( + echo [%DATE% %TIME%] ERROR: edit_fooocus_modules.bat not found in: %editor_image_generation_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_fooocus_modules.bat not found in: %editor_image_generation_dir%%reset% + pause + goto :editor_image_generation + ) +) else if "%editor_image_generation_choice%"=="0" ( goto :editor ) else ( echo [%DATE% %TIME%] %log_invalidinput% >> %logs_stl_console_path% @@ -3408,197 +3212,6 @@ if "%editor_img_gen_choice%"=="1" ( goto :editor_image_generation ) -REM ################################################################################################################################################## -REM ################################################################################################################################################## -REM ################################################################################################################################################## - - -REM Function to print module options with color based on their status -:printModule -if "%2"=="true" ( - echo %green_fg_strong%%1 [Enabled]%reset% -) else ( - echo %red_fg_strong%%1 [Disabled]%reset% -) -exit /b - -REM ############################################################ -REM ############## EDIT SDWEBUI MODULES - FRONTEND ############# -REM ############################################################ -:edit_sdwebui_modules -title STL [EDIT SDWEBUI MODULES] -cls -echo %blue_fg_strong%/ Home / Toolbox / Editor / Image Generation / Edit SDWEBUI Modules%reset% -echo ------------------------------------------------------------- -echo Choose SDWEBUI modules to enable or disable (e.g., "1 2 4" to enable autolaunch, api, and opt-sdp-attention) - -REM Display module options with colors based on their status -call :printModule "1. autolaunch (--autolaunch)" %sdwebui_autolaunch_trigger% -call :printModule "2. api (--api)" %sdwebui_api_trigger% -call :printModule "3. port (--port 7900)" %sdwebui_port_trigger% -call :printModule "4. opt-sdp-attention (--opt-sdp-attention)" %sdwebui_optsdpattention_trigger% -call :printModule "5. listen (--listen)" %sdwebui_listen_trigger% -call :printModule "6. theme dark (--theme dark)" %sdwebui_themedark_trigger% -call :printModule "7. skip torchcudatest (--skip-torch-cuda-test)" %sdwebui_skiptorchcudatest_trigger% -call :printModule "8. low vram (--lowvram)" %sdwebui_lowvram_trigger% -call :printModule "9. med vram (--medvram)" %sdwebui_medvram_trigger% -echo 00. Quick Start Stable Diffusion WebUI -echo 0. Back - -set "python_command=" - -set /p xtts_module_choices=Choose modules to enable/disable: - -REM Handle the user's module choices and construct the Python command -for %%i in (%xtts_module_choices%) do ( - if "%%i"=="1" ( - if "%sdwebui_autolaunch_trigger%"=="true" ( - set "sdwebui_autolaunch_trigger=false" - ) else ( - set "sdwebui_autolaunch_trigger=true" - ) - - ) else if "%%i"=="2" ( - if "%sdwebui_api_trigger%"=="true" ( - set "sdwebui_api_trigger=false" - ) else ( - set "sdwebui_api_trigger=true" - ) - - ) else if "%%i"=="3" ( - if "%sdwebui_port_trigger%"=="true" ( - set "sdwebui_port_trigger=false" - ) else ( - set "sdwebui_port_trigger=true" - ) - - ) else if "%%i"=="4" ( - if "%sdwebui_optsdpattention_trigger%"=="true" ( - set "sdwebui_optsdpattention_trigger=false" - ) else ( - set "sdwebui_optsdpattention_trigger=true" - ) - - ) else if "%%i"=="5" ( - if "%sdwebui_listen_trigger%"=="true" ( - set "sdwebui_listen_trigger=false" - ) else ( - set "sdwebui_listen_trigger=true" - ) - ) else if "%%i"=="6" ( - if "%sdwebui_themedark_trigger%"=="true" ( - set "sdwebui_themedark_trigger=false" - ) else ( - set "sdwebui_themedark_trigger=true" - ) - ) else if "%%i"=="7" ( - if "%sdwebui_skiptorchcudatest_trigger%"=="true" ( - set "sdwebui_skiptorchcudatest_trigger=false" - ) else ( - set "sdwebui_skiptorchcudatest_trigger=true" - ) - ) else if "%%i"=="8" ( - if "%sdwebui_lowvram_trigger%"=="true" ( - set "sdwebui_lowvram_trigger=false" - ) else ( - set "sdwebui_lowvram_trigger=true" - ) - ) else if "%%i"=="9" ( - if "%sdwebui_medvram_trigger%"=="true" ( - set "sdwebui_medvram_trigger=false" - ) else ( - set "sdwebui_medvram_trigger=true" - ) - - ) else if "%%i"=="00" ( - goto :start_sdwebui - - ) else if "%%i"=="0" ( - goto :editor_image_generation - ) -) - -REM Save the module flags to modules-sdwebui -echo sdwebui_autolaunch_trigger=%sdwebui_autolaunch_trigger%>%sdwebui_modules_path% -echo sdwebui_api_trigger=%sdwebui_api_trigger%>>%sdwebui_modules_path% -echo sdwebui_port_trigger=%sdwebui_port_trigger%>>%sdwebui_modules_path% -echo sdwebui_optsdpattention_trigger=%sdwebui_optsdpattention_trigger%>>%sdwebui_modules_path% -echo sdwebui_listen_trigger=%sdwebui_listen_trigger%>>%sdwebui_modules_path% -echo sdwebui_themedark_trigger=%sdwebui_themedark_trigger%>>%sdwebui_modules_path% -echo sdwebui_skiptorchcudatest_trigger=%sdwebui_skiptorchcudatest_trigger%>>%sdwebui_modules_path% -echo sdwebui_lowvram_trigger=%sdwebui_lowvram_trigger%>>%sdwebui_modules_path% -echo sdwebui_medvram_trigger=%sdwebui_medvram_trigger%>>%sdwebui_modules_path% - -REM remove modules_enable -set "modules_enable=" - -REM Compile the Python command -set "python_command=python launch.py" -if "%sdwebui_autolaunch_trigger%"=="true" ( - set "python_command=%python_command% --autolaunch" -) -if "%sdwebui_api_trigger%"=="true" ( - set "python_command=%python_command% --api" -) -if "%sdwebui_port_trigger%"=="true" ( - set "python_command=%python_command% --port 7900" -) -if "%sdwebui_optsdpattention_trigger%"=="true" ( - set "python_command=%python_command% --opt-sdp-attention" -) -if "%sdwebui_listen_trigger%"=="true" ( - set "python_command=%python_command% --listen" -) -if "%sdwebui_themedark_trigger%"=="true" ( - set "python_command=%python_command% --theme dark" -) -if "%sdwebui_skiptorchcudatest_trigger%"=="true" ( - set "python_command=%python_command% --skip-torch-cuda-test" -) -if "%sdwebui_lowvram_trigger%"=="true" ( - set "python_command=%python_command% --lowvram" -) -if "%sdwebui_medvram_trigger%"=="true" ( - set "python_command=%python_command% --medvram" -) - -REM is modules_enable empty? -if defined modules_enable ( - REM remove last comma - set "modules_enable=%modules_enable:~0,-1%" -) - -REM command completed -if defined modules_enable ( - set "python_command=%python_command% --enable-modules=%modules_enable%" -) - -REM Save the constructed Python command to modules-sdwebui for testing -echo sdwebui_start_command=%python_command%>>%sdwebui_modules_path% -goto :edit_sdwebui_modules - -REM ################################################################################################################################################## -REM ################################################################################################################################################## -REM ################################################################################################################################################## - - -:edit_sdwebuiforge -echo COMING SOON -pause -goto :editor_image_generation - - -:edit_comfyui -echo COMING SOON -pause -goto :editor_image_generation - - -:edit_fooocus -echo COMING SOON -pause -goto :editor_image_generation - REM ############################################################ REM ######## EDITOR CORE UTILITIES - FRONTEND ################## @@ -3629,25 +3242,52 @@ echo 3. Edit Extras echo 4. Edit Environment Variables echo 0. Back -set /p editor_core_util_choice=Choose Your Destiny: +set /p editor_core_utilities_choice=Choose Your Destiny: REM ######## EDITOR CORE UTILITIES - FRONTEND ################## -if "%editor_core_util_choice%"=="1" ( - call :edit_st_config -) else if "%editor_core_util_choice%"=="2" ( +if "%editor_core_utilities_choice%"=="1" ( + set "caller=editor_core_utilities" + if exist "%editor_core_utilities_dir%\edit_st_config.bat" ( + call %editor_core_utilities_dir%\edit_st_config.bat + goto :editor_core_utilities + ) else ( + echo [%DATE% %TIME%] ERROR: edit_st_config.bat not found in: %editor_core_utilities_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_st_config.bat not found in: %editor_core_utilities_dir%%reset% + pause + goto :editor_core_utilities + ) +) else if "%editor_core_utilities_choice%"=="2" ( call :create_st_ssl -) else if "%editor_core_util_choice%"=="3" ( - call :edit_extras_modules -) else if "%editor_core_util_choice%"=="4" ( - call :edit_env_var -) else if "%editor_core_util_choice%"=="0" ( - goto :editor -) else if "%editor_core_util_choice%"=="8" ( +) else if "%editor_core_utilities_choice%"=="3" ( + set "caller=editor_core_utilities" + if exist "%editor_core_utilities_dir%\edit_extras_modules.bat" ( + call %editor_core_utilities_dir%\edit_extras_modules.bat + goto :editor_core_utilities + ) else ( + echo [%DATE% %TIME%] ERROR: edit_extras_modules.bat not found in: %editor_core_utilities_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_extras_modules.bat not found in: %editor_core_utilities_dir%%reset% + pause + goto :editor_core_utilities + ) +) else if "%editor_core_utilities_choice%"=="4" ( + set "caller=editor_core_utilities" + if exist "%editor_core_utilities_dir%\edit_env_var.bat" ( + call %editor_core_utilities_dir%\edit_env_var.bat + goto :editor_core_utilities + ) else ( + echo [%DATE% %TIME%] ERROR: edit_env_var.bat not found in: %editor_core_utilities_dir% >> %logs_stl_console_path% + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_env_var.bat not found in: %editor_core_utilities_dir%%reset% + pause + goto :editor_core_utilities + ) +) else if "%editor_core_utilities_choice%"=="8" ( goto :delete_st_ssl -) else if "%editor_core_util_choice%"=="9" ( +) else if "%editor_core_utilities_choice%"=="9" ( echo Opening SillyTavernai.com SSL Info Page start "" "https://sillytavernai.com/launcher-ssl" goto :editor_core_utilities +) else if "%editor_core_utilities_choice%"=="0" ( + goto :editor ) else ( echo [%DATE% %TIME%] %log_invalidinput% >> %logs_stl_console_path% echo %red_bg%[%time%]%reset% %echo_invalidinput% @@ -3655,10 +3295,6 @@ if "%editor_core_util_choice%"=="1" ( goto :editor_core_utilities ) -:edit_st_config -start "" "%st_install_path%\config.yaml" -goto :editor_core_utilities - :create_st_ssl call "%functions_dir%\SSL\create_ssl.bat" no-pause REM Check the error level returned by the main batch file @@ -3688,191 +3324,6 @@ if exist "%CERTS_DIR%" ( pause goto :editor_core_utilities -REM ################################################################################################################################################## -REM ################################################################################################################################################## -REM ################################################################################################################################################## - -REM Function to print module options with color based on their status -:printModule -if "%2"=="true" ( - echo %green_fg_strong%%1 [Enabled]%reset% -) else ( - echo %red_fg_strong%%1 [Disabled]%reset% -) -exit /b - -REM ############################################################ -REM ############## EDIT EXTRAS MODULES - FRONTEND ############## -REM ############################################################ -:edit_extras_modules -title STL [EDIT EXTRAS MODULES] -cls -echo %blue_fg_strong%/ Home / Toolbox / Editor / Edit Extras Modules%reset% -echo ------------------------------------------------------------- -echo Choose extras modules to enable or disable (e.g., "1 2 4" to enable Cuda, RVC, and Caption) - -REM Display module options with colors based on their status -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-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% -call :printModule "7. whisper (--enable-modules=whisper-stt)" %whisper_trigger% -call :printModule "8. Edge-tts (--enable-modules=edge-tts)" %edge_tts_trigger% -call :printModule "9. Websearch (--enable-modules=websearch)" %websearch_trigger% -echo 00. Quick Start Extras -echo 0. Back - -set "python_command=" - -set /p module_choices=Choose modules to enable/disable: - -REM Handle the user's module choices and construct the Python command -for %%i in (%module_choices%) do ( - if "%%i"=="1" ( - if "%cuda_trigger%"=="true" ( - set "cuda_trigger=false" - ) else ( - set "cuda_trigger=true" - ) - - ) else if "%%i"=="2" ( - if "%rvc_trigger%"=="true" ( - set "rvc_trigger=false" - ) else ( - set "rvc_trigger=true" - ) - - ) else if "%%i"=="3" ( - if "%talkinghead_trigger%"=="true" ( - set "talkinghead_trigger=false" - ) else ( - set "talkinghead_trigger=true" - ) - - ) else if "%%i"=="4" ( - if "%caption_trigger%"=="true" ( - set "caption_trigger=false" - ) else ( - set "caption_trigger=true" - ) - - ) else if "%%i"=="5" ( - if "%summarize_trigger%"=="true" ( - set "summarize_trigger=false" - ) else ( - set "summarize_trigger=true" - ) - ) else if "%%i"=="6" ( - if "%listen_trigger%"=="true" ( - set "listen_trigger=false" - ) else ( - set "listen_trigger=true" - ) - - ) else if "%%i"=="7" ( - if "%whisper_trigger%"=="true" ( - set "whisper_trigger=false" - ) else ( - set "whisper_trigger=true" - ) - - ) else if "%%i"=="8" ( - if "%edge_tts_trigger%"=="true" ( - set "edge_tts_trigger=false" - ) else ( - set "edge_tts_trigger=true" - ) - - ) else if "%%i"=="9" ( - if "%websearch_trigger%"=="true" ( - set "websearch_trigger=false" - ) else ( - set "websearch_trigger=true" - ) - - ) else if "%%i"=="00" ( - goto :start_extras - - ) else if "%%i"=="0" ( - goto :editor_core_utilities - ) -) - -REM Save the module flags -echo cuda_trigger=%cuda_trigger%>%extras_modules_path% -echo rvc_trigger=%rvc_trigger%>>%extras_modules_path% -echo talkinghead_trigger=%talkinghead_trigger%>>%extras_modules_path% -echo caption_trigger=%caption_trigger%>>%extras_modules_path% -echo summarize_trigger=%summarize_trigger%>>%extras_modules_path% -echo listen_trigger=%listen_trigger%>>%extras_modules_path% -echo whisper_trigger=%whisper_trigger%>>%extras_modules_path% -echo edge_tts_trigger=%edge_tts_trigger%>>%extras_modules_path% -echo websearch_trigger=%websearch_trigger%>>%extras_modules_path% - - -REM remove modules_enable -set "modules_enable=" - -REM Compile the Python command -set "python_command=python server.py" -if "%listen_trigger%"=="true" ( - set "python_command=%python_command% --listen" -) -if "%cuda_trigger%"=="true" ( - 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" ( - set "modules_enable=%modules_enable%caption," -) -if "%summarize_trigger%"=="true" ( - set "modules_enable=%modules_enable%summarize," -) -if "%whisper_trigger%"=="true" ( - set "modules_enable=%modules_enable%whisper-stt," -) -if "%edge_tts_trigger%"=="true" ( - set "modules_enable=%modules_enable%edge-tts," -) -if "%websearch_trigger%"=="true" ( - set "modules_enable=%modules_enable%websearch," -) - -REM is modules_enable empty? -if defined modules_enable ( - REM remove last comma - set "modules_enable=%modules_enable:~0,-1%" -) - -REM command completed -if defined modules_enable ( - set "python_command=%python_command% --enable-modules=%modules_enable%" -) - -REM Save the constructed Python command to modules-extras for testing -echo extras_start_command=%python_command%>>%extras_modules_path% -goto :edit_extras_modules - - - -REM ################################################################################################################################################## -REM ################################################################################################################################################## -REM ################################################################################################################################################## - - -:edit_env_var -start "" rundll32.exe sysdm.cpl,EditEnvironmentVariables -goto :editor_core_utilities - REM ############################################################ REM ############## TROUBLESHOOTING - FRONTEND ################## diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/edit_env_var.bat b/bin/functions/Toolbox/Editor/Core_Utilities/edit_env_var.bat new file mode 100644 index 0000000..da57d4e --- /dev/null +++ b/bin/functions/Toolbox/Editor/Core_Utilities/edit_env_var.bat @@ -0,0 +1,3 @@ +:edit_env_var +start "" rundll32.exe sysdm.cpl,EditEnvironmentVariables +goto :editor_core_utilities \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/edit_extras_modules.bat b/bin/functions/Toolbox/Editor/Core_Utilities/edit_extras_modules.bat new file mode 100644 index 0000000..93ce014 --- /dev/null +++ b/bin/functions/Toolbox/Editor/Core_Utilities/edit_extras_modules.bat @@ -0,0 +1,171 @@ +@echo off + +REM ############################################################ +REM ############## EDIT EXTRAS MODULES - FRONTEND ############## +REM ############################################################ +:edit_extras_modules +title STL [EDIT EXTRAS MODULES] +cls +echo %blue_fg_strong%/ Home / Toolbox / Editor / Edit Extras Modules%reset% +echo ------------------------------------------------------------- +echo Choose extras modules to enable or disable (e.g., "1 2 4" to enable Cuda, RVC, and Caption) + +REM Display module options with colors based on their status +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-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% +call :printModule "7. whisper (--enable-modules=whisper-stt)" %whisper_trigger% +call :printModule "8. Edge-tts (--enable-modules=edge-tts)" %edge_tts_trigger% +call :printModule "9. Websearch (--enable-modules=websearch)" %websearch_trigger% +echo 00. Quick Start Extras +echo 0. Back + +set "python_command=" + +set /p module_choices=Choose modules to enable/disable: + +REM Handle the user's module choices and construct the Python command +for %%i in (%module_choices%) do ( + if "%%i"=="1" ( + if "%cuda_trigger%"=="true" ( + set "cuda_trigger=false" + ) else ( + set "cuda_trigger=true" + ) + + ) else if "%%i"=="2" ( + if "%rvc_trigger%"=="true" ( + set "rvc_trigger=false" + ) else ( + set "rvc_trigger=true" + ) + + ) else if "%%i"=="3" ( + if "%talkinghead_trigger%"=="true" ( + set "talkinghead_trigger=false" + ) else ( + set "talkinghead_trigger=true" + ) + + ) else if "%%i"=="4" ( + if "%caption_trigger%"=="true" ( + set "caption_trigger=false" + ) else ( + set "caption_trigger=true" + ) + + ) else if "%%i"=="5" ( + if "%summarize_trigger%"=="true" ( + set "summarize_trigger=false" + ) else ( + set "summarize_trigger=true" + ) + ) else if "%%i"=="6" ( + if "%listen_trigger%"=="true" ( + set "listen_trigger=false" + ) else ( + set "listen_trigger=true" + ) + + ) else if "%%i"=="7" ( + if "%whisper_trigger%"=="true" ( + set "whisper_trigger=false" + ) else ( + set "whisper_trigger=true" + ) + + ) else if "%%i"=="8" ( + if "%edge_tts_trigger%"=="true" ( + set "edge_tts_trigger=false" + ) else ( + set "edge_tts_trigger=true" + ) + + ) else if "%%i"=="9" ( + if "%websearch_trigger%"=="true" ( + set "websearch_trigger=false" + ) else ( + set "websearch_trigger=true" + ) + + ) else if "%%i"=="00" ( + goto :start_extras + + ) else if "%%i"=="0" ( + goto :editor_core_utilities + ) +) + +REM Save the module flags +echo cuda_trigger=%cuda_trigger%>%extras_modules_path% +echo rvc_trigger=%rvc_trigger%>>%extras_modules_path% +echo talkinghead_trigger=%talkinghead_trigger%>>%extras_modules_path% +echo caption_trigger=%caption_trigger%>>%extras_modules_path% +echo summarize_trigger=%summarize_trigger%>>%extras_modules_path% +echo listen_trigger=%listen_trigger%>>%extras_modules_path% +echo whisper_trigger=%whisper_trigger%>>%extras_modules_path% +echo edge_tts_trigger=%edge_tts_trigger%>>%extras_modules_path% +echo websearch_trigger=%websearch_trigger%>>%extras_modules_path% + + +REM remove modules_enable +set "modules_enable=" + +REM Compile the Python command +set "python_command=python server.py" +if "%listen_trigger%"=="true" ( + set "python_command=%python_command% --listen" +) +if "%cuda_trigger%"=="true" ( + 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" ( + set "modules_enable=%modules_enable%caption," +) +if "%summarize_trigger%"=="true" ( + set "modules_enable=%modules_enable%summarize," +) +if "%whisper_trigger%"=="true" ( + set "modules_enable=%modules_enable%whisper-stt," +) +if "%edge_tts_trigger%"=="true" ( + set "modules_enable=%modules_enable%edge-tts," +) +if "%websearch_trigger%"=="true" ( + set "modules_enable=%modules_enable%websearch," +) + +REM is modules_enable empty? +if defined modules_enable ( + REM remove last comma + set "modules_enable=%modules_enable:~0,-1%" +) + +REM command completed +if defined modules_enable ( + set "python_command=%python_command% --enable-modules=%modules_enable%" +) + +REM Save the constructed Python command to modules-extras for testing +echo extras_start_command=%python_command%>>%extras_modules_path% +goto :edit_extras_modules + +REM Function to print module options with color based on their status +:printModule +if "%2"=="true" ( + echo %green_fg_strong%%1 [Enabled]%reset% +) else ( + echo %red_fg_strong%%1 [Disabled]%reset% +) +exit /b \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/edit_st_config.bat b/bin/functions/Toolbox/Editor/Core_Utilities/edit_st_config.bat new file mode 100644 index 0000000..54b352a --- /dev/null +++ b/bin/functions/Toolbox/Editor/Core_Utilities/edit_st_config.bat @@ -0,0 +1,5 @@ +@echo off + +:edit_st_config +start "" "%st_install_path%\config.yaml" +goto :editor_core_utilities \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_7zip.bat b/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_7zip.bat deleted file mode 100644 index 12cd158..0000000 --- a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_7zip.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off - -:uninstall_7zip -title STL [UNINSTALL-7ZIP] -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstalling 7-Zip... -winget uninstall --id 7zip.7zip -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%7-Zip has been uninstalled successfully.%reset% -pause -goto :app_uninstaller_core_utilities \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_cudatoolkit.bat b/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_cudatoolkit.bat deleted file mode 100644 index 26d377b..0000000 --- a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_cudatoolkit.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off - -:uninstall_cudatoolkit -title STL [UNINSTALL-CUDATOOLKIT] -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstalling CUDA Toolkit... -winget uninstall --id Nvidia.CUDA -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%CUDA Toolkit has been uninstalled successfully.%reset% -pause -goto :app_uninstaller_core_utilities \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_extras.bat b/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_extras.bat deleted file mode 100644 index 1a62e85..0000000 --- a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_extras.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off - -:uninstall_extras -title STL [UNINSTALL EXTRAS] -setlocal enabledelayedexpansion -chcp 65001 > nul - -REM Confirm with the user before proceeding -echo. -echo %red_bg%╔════ DANGER ZONE ══════════════════════════════════════════════════════════════════════════════╗%reset% -echo %red_bg%║ WARNING: This will delete all data of Extras ║%reset% -echo %red_bg%║ If you want to keep any data, make sure to create a backup before proceeding. ║%reset% -echo %red_bg%╚═══════════════════════════════════════════════════════════════════════════════════════════════╝%reset% -echo. -set /p "confirmation=Are you sure you want to proceed? [Y/N]: " -if /i "%confirmation%"=="Y" ( - - REM Remove the Conda environment - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Conda enviroment: %cyan_fg_strong%extras%reset% - call conda deactivate - call conda remove --name extras --all -y - call conda clean -a -y - - REM Remove the folder SillyTavern-extras - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the SillyTavern-extras directory... - cd /d "%~dp0" - rmdir /s /q "%extras_install_path%" - - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Extras has been uninstalled successfully.%reset% - pause - goto :app_uninstaller_core_utilities -) else ( - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstall canceled. - pause - goto :app_uninstaller_core_utilities -) \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_ffmpeg.bat b/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_ffmpeg.bat deleted file mode 100644 index d688717..0000000 --- a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_ffmpeg.bat +++ /dev/null @@ -1,24 +0,0 @@ -@echo off - -:uninstall_ffmpeg -title STL [UNINSTALL-FFMPEG] -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstalling ffmpeg... -rmdir /s /q "%ffmpeg_install_path%" - -setlocal EnableDelayedExpansion -rem Get the current PATH value from the registry -for /f "tokens=2*" %%A in ('reg query "HKCU\Environment" /v PATH') do set "current_path=%%B" - -rem Remove the path from the current PATH if it exists -set "new_path=!current_path:%ffmpeg_path_bin%=!" - -REM Update the PATH value in the registry -reg add "HKCU\Environment" /v PATH /t REG_EXPAND_SZ /d "!new_path!" /f - -REM Update the PATH value for the current session -setx PATH "!new_path!" > nul -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%ffmpeg removed from PATH.%reset% -endlocal - -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%ffmpeg has been uninstalled successfully.%reset% -goto :app_uninstaller_core_utilities \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_nodejs.bat b/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_nodejs.bat deleted file mode 100644 index f86810c..0000000 --- a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_nodejs.bat +++ /dev/null @@ -1,8 +0,0 @@ -@echo off - -:uninstall_nodejs -title STL [UNINSTALL-NODEJS] -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstalling Node.js... -winget uninstall --id OpenJS.NodeJS -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Node.js has been uninstalled successfully.%reset% -goto :app_uninstaller_core_utilities \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_st.bat b/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_st.bat deleted file mode 100644 index b2fe605..0000000 --- a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_st.bat +++ /dev/null @@ -1,30 +0,0 @@ -@echo off - -:uninstall_st -title STL [UNINSTALL ST] -setlocal enabledelayedexpansion -chcp 65001 > nul - -REM Confirm with the user before proceeding -echo. -echo %red_bg%╔════ DANGER ZONE ══════════════════════════════════════════════════════════════════════════════╗%reset% -echo %red_bg%║ WARNING: This will delete all data of SillyTavern ║%reset% -echo %red_bg%║ If you want to keep any data, make sure to create a backup before proceeding. ║%reset% -echo %red_bg%╚═══════════════════════════════════════════════════════════════════════════════════════════════╝%reset% -echo. -set /p "confirmation=Are you sure you want to proceed? [Y/N]: " -if /i "%confirmation%"=="Y" ( - - REM Remove the folder SillyTavern - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the SillyTavern directory... - cd /d "%~dp0" - rmdir /s /q "%st_install_path%" - - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%SillyTavern has been uninstalled successfully.%reset% - pause - goto :app_uninstaller_core_utilities -) else ( - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstall canceled. - pause - goto :app_uninstaller_core_utilities -) \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_vsbuildtools.bat b/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_vsbuildtools.bat deleted file mode 100644 index 0750156..0000000 --- a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_vsbuildtools.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off - -:uninstall_vsbuildtools -title STL [UNINSTALL-VSBUILDTOOLS] -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstalling Visual Studio BuildTools 2022... -winget uninstall --id Microsoft.VisualStudio.2022.BuildTools -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Visual Studio BuildTools 2022 has been uninstalled successfully.%reset% -pause -goto :app_uninstaller_core_utilities \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_w64devkit.bat b/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_w64devkit.bat deleted file mode 100644 index 5137afc..0000000 --- a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_w64devkit.bat +++ /dev/null @@ -1,25 +0,0 @@ -@echo off - -:uninstall_w64devkit -title STL [UNINSTALL-VSBUILDTOOLS] -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstalling w64devkit... -rmdir /s /q "%w64devkit_install_path%" - -setlocal EnableDelayedExpansion -REM Get the current PATH value from the registry -for /f "tokens=2*" %%A in ('reg query "HKCU\Environment" /v PATH') do set "current_path=%%B" - -REM Remove the path from the current PATH if it exists -set "new_path=!current_path:%w64devkit_path_bin%=!" - -REM Update the PATH value in the registry -reg add "HKCU\Environment" /v PATH /t REG_EXPAND_SZ /d "!new_path!" /f - -REM Update the PATH value for the current session -setx PATH "!new_path!" > nul -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%w64devkit removed from PATH.%reset% -endlocal - -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%w64devkit has been uninstalled successfully.%reset% -pause -goto :app_uninstaller_core_utilities \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_yq.bat b/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_yq.bat deleted file mode 100644 index e4d77b2..0000000 --- a/bin/functions/Toolbox/Editor/Core_Utilities/uninstall_yq.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off - -:uninstall_yq -title STL [UNINSTALL-YQ] -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstalling yq... -winget uninstall --id MikeFarah.yq -echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%yq has been uninstalled successfully.%reset% -pause -goto :app_uninstaller_core_utilities \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Image_Generation/edit_comfyui_modules.bat b/bin/functions/Toolbox/Editor/Image_Generation/edit_comfyui_modules.bat new file mode 100644 index 0000000..d421093 --- /dev/null +++ b/bin/functions/Toolbox/Editor/Image_Generation/edit_comfyui_modules.bat @@ -0,0 +1,6 @@ +@echo off + +:edit_comfyui_modules +echo COMING SOON +pause +goto :editor_image_generation diff --git a/bin/functions/Toolbox/Editor/Image_Generation/edit_fooocus_modules.bat b/bin/functions/Toolbox/Editor/Image_Generation/edit_fooocus_modules.bat new file mode 100644 index 0000000..85bc897 --- /dev/null +++ b/bin/functions/Toolbox/Editor/Image_Generation/edit_fooocus_modules.bat @@ -0,0 +1,6 @@ +@echo off + +:edit_fooocus_modules +echo COMING SOON +pause +goto :editor_image_generation diff --git a/bin/functions/Toolbox/Editor/Image_Generation/edit_sdwebui_modules.bat b/bin/functions/Toolbox/Editor/Image_Generation/edit_sdwebui_modules.bat new file mode 100644 index 0000000..7fb7d1c --- /dev/null +++ b/bin/functions/Toolbox/Editor/Image_Generation/edit_sdwebui_modules.bat @@ -0,0 +1,165 @@ +@echo off + +REM ############################################################ +REM ############## EDIT SDWEBUI MODULES - FRONTEND ############# +REM ############################################################ +:edit_sdwebui_modules +title STL [EDIT SDWEBUI MODULES] +cls +echo %blue_fg_strong%/ Home / Toolbox / Editor / Image Generation / Edit SDWEBUI Modules%reset% +echo ------------------------------------------------------------- +echo Choose SDWEBUI modules to enable or disable (e.g., "1 2 4" to enable autolaunch, api, and opt-sdp-attention) + +REM Display module options with colors based on their status +call :printModule "1. autolaunch (--autolaunch)" %sdwebui_autolaunch_trigger% +call :printModule "2. api (--api)" %sdwebui_api_trigger% +call :printModule "3. port (--port 7900)" %sdwebui_port_trigger% +call :printModule "4. opt-sdp-attention (--opt-sdp-attention)" %sdwebui_optsdpattention_trigger% +call :printModule "5. listen (--listen)" %sdwebui_listen_trigger% +call :printModule "6. theme dark (--theme dark)" %sdwebui_themedark_trigger% +call :printModule "7. skip torchcudatest (--skip-torch-cuda-test)" %sdwebui_skiptorchcudatest_trigger% +call :printModule "8. low vram (--lowvram)" %sdwebui_lowvram_trigger% +call :printModule "9. med vram (--medvram)" %sdwebui_medvram_trigger% +echo 00. Quick Start Stable Diffusion WebUI +echo 0. Back + +set "python_command=" + +set /p xtts_module_choices=Choose modules to enable/disable: + +REM Handle the user's module choices and construct the Python command +for %%i in (%xtts_module_choices%) do ( + if "%%i"=="1" ( + if "%sdwebui_autolaunch_trigger%"=="true" ( + set "sdwebui_autolaunch_trigger=false" + ) else ( + set "sdwebui_autolaunch_trigger=true" + ) + + ) else if "%%i"=="2" ( + if "%sdwebui_api_trigger%"=="true" ( + set "sdwebui_api_trigger=false" + ) else ( + set "sdwebui_api_trigger=true" + ) + + ) else if "%%i"=="3" ( + if "%sdwebui_port_trigger%"=="true" ( + set "sdwebui_port_trigger=false" + ) else ( + set "sdwebui_port_trigger=true" + ) + + ) else if "%%i"=="4" ( + if "%sdwebui_optsdpattention_trigger%"=="true" ( + set "sdwebui_optsdpattention_trigger=false" + ) else ( + set "sdwebui_optsdpattention_trigger=true" + ) + + ) else if "%%i"=="5" ( + if "%sdwebui_listen_trigger%"=="true" ( + set "sdwebui_listen_trigger=false" + ) else ( + set "sdwebui_listen_trigger=true" + ) + ) else if "%%i"=="6" ( + if "%sdwebui_themedark_trigger%"=="true" ( + set "sdwebui_themedark_trigger=false" + ) else ( + set "sdwebui_themedark_trigger=true" + ) + ) else if "%%i"=="7" ( + if "%sdwebui_skiptorchcudatest_trigger%"=="true" ( + set "sdwebui_skiptorchcudatest_trigger=false" + ) else ( + set "sdwebui_skiptorchcudatest_trigger=true" + ) + ) else if "%%i"=="8" ( + if "%sdwebui_lowvram_trigger%"=="true" ( + set "sdwebui_lowvram_trigger=false" + ) else ( + set "sdwebui_lowvram_trigger=true" + ) + ) else if "%%i"=="9" ( + if "%sdwebui_medvram_trigger%"=="true" ( + set "sdwebui_medvram_trigger=false" + ) else ( + set "sdwebui_medvram_trigger=true" + ) + + ) else if "%%i"=="00" ( + goto :start_sdwebui + + ) else if "%%i"=="0" ( + goto :editor_image_generation + ) +) + +REM Save the module flags to modules-sdwebui +echo sdwebui_autolaunch_trigger=%sdwebui_autolaunch_trigger%>%sdwebui_modules_path% +echo sdwebui_api_trigger=%sdwebui_api_trigger%>>%sdwebui_modules_path% +echo sdwebui_port_trigger=%sdwebui_port_trigger%>>%sdwebui_modules_path% +echo sdwebui_optsdpattention_trigger=%sdwebui_optsdpattention_trigger%>>%sdwebui_modules_path% +echo sdwebui_listen_trigger=%sdwebui_listen_trigger%>>%sdwebui_modules_path% +echo sdwebui_themedark_trigger=%sdwebui_themedark_trigger%>>%sdwebui_modules_path% +echo sdwebui_skiptorchcudatest_trigger=%sdwebui_skiptorchcudatest_trigger%>>%sdwebui_modules_path% +echo sdwebui_lowvram_trigger=%sdwebui_lowvram_trigger%>>%sdwebui_modules_path% +echo sdwebui_medvram_trigger=%sdwebui_medvram_trigger%>>%sdwebui_modules_path% + +REM remove modules_enable +set "modules_enable=" + +REM Compile the Python command +set "python_command=python launch.py" +if "%sdwebui_autolaunch_trigger%"=="true" ( + set "python_command=%python_command% --autolaunch" +) +if "%sdwebui_api_trigger%"=="true" ( + set "python_command=%python_command% --api" +) +if "%sdwebui_port_trigger%"=="true" ( + set "python_command=%python_command% --port 7900" +) +if "%sdwebui_optsdpattention_trigger%"=="true" ( + set "python_command=%python_command% --opt-sdp-attention" +) +if "%sdwebui_listen_trigger%"=="true" ( + set "python_command=%python_command% --listen" +) +if "%sdwebui_themedark_trigger%"=="true" ( + set "python_command=%python_command% --theme dark" +) +if "%sdwebui_skiptorchcudatest_trigger%"=="true" ( + set "python_command=%python_command% --skip-torch-cuda-test" +) +if "%sdwebui_lowvram_trigger%"=="true" ( + set "python_command=%python_command% --lowvram" +) +if "%sdwebui_medvram_trigger%"=="true" ( + set "python_command=%python_command% --medvram" +) + +REM is modules_enable empty? +if defined modules_enable ( + REM remove last comma + set "modules_enable=%modules_enable:~0,-1%" +) + +REM command completed +if defined modules_enable ( + set "python_command=%python_command% --enable-modules=%modules_enable%" +) + +REM Save the constructed Python command to modules-sdwebui for testing +echo sdwebui_start_command=%python_command%>>%sdwebui_modules_path% +goto :edit_sdwebui_modules + +REM Function to print module options with color based on their status +:printModule +if "%2"=="true" ( + echo %green_fg_strong%%1 [Enabled]%reset% +) else ( + echo %red_fg_strong%%1 [Disabled]%reset% +) +exit /b diff --git a/bin/functions/Toolbox/Editor/Image_Generation/edit_sdwebuiforge_modules.bat b/bin/functions/Toolbox/Editor/Image_Generation/edit_sdwebuiforge_modules.bat new file mode 100644 index 0000000..4f9ed75 --- /dev/null +++ b/bin/functions/Toolbox/Editor/Image_Generation/edit_sdwebuiforge_modules.bat @@ -0,0 +1,6 @@ +@echo off + +:edit_sdwebuiforge_modules +echo COMING SOON +pause +goto :editor_image_generation \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Image_Generation/uninstall_comfyui.bat b/bin/functions/Toolbox/Editor/Image_Generation/uninstall_comfyui.bat deleted file mode 100644 index 604844d..0000000 --- a/bin/functions/Toolbox/Editor/Image_Generation/uninstall_comfyui.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off - -:uninstall_comfyui -title STL [UNINSTALL COMFYUI] -setlocal enabledelayedexpansion -chcp 65001 > nul - -REM Confirm with the user before proceeding -echo. -echo %red_bg%╔════ DANGER ZONE ══════════════════════════════════════════════════════════════════════════════╗%reset% -echo %red_bg%║ WARNING: This will delete all data of ComfyUI ║%reset% -echo %red_bg%║ If you want to keep any data, make sure to create a backup before proceeding. ║%reset% -echo %red_bg%╚═══════════════════════════════════════════════════════════════════════════════════════════════╝%reset% -echo. -set /p "confirmation=Are you sure you want to proceed? [Y/N]: " -if /i "%confirmation%"=="Y" ( - - REM Remove the Conda environment - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Conda enviroment: %cyan_fg_strong%comfyui%reset% - call conda deactivate - call conda remove --name comfyui --all -y - call conda clean -a -y - - REM Remove the folder ComfyUI - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the ComfyUI directory... - cd /d "%~dp0" - rmdir /s /q "%comfyui_install_path%" - - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%ComfyUI has been uninstalled successfully.%reset% - pause - goto :app_uninstaller_image_generation -) else ( - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstall canceled. - pause - goto :app_uninstaller_image_generation -) \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Image_Generation/uninstall_fooocus.bat b/bin/functions/Toolbox/Editor/Image_Generation/uninstall_fooocus.bat deleted file mode 100644 index 817d2c1..0000000 --- a/bin/functions/Toolbox/Editor/Image_Generation/uninstall_fooocus.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off - -:uninstall_fooocus -title STL [UNINSTALL FOOOCUS] -setlocal enabledelayedexpansion -chcp 65001 > nul - -REM Confirm with the user before proceeding -echo. -echo %red_bg%╔════ DANGER ZONE ══════════════════════════════════════════════════════════════════════════════╗%reset% -echo %red_bg%║ WARNING: This will delete all data of Fooocus ║%reset% -echo %red_bg%║ If you want to keep any data, make sure to create a backup before proceeding. ║%reset% -echo %red_bg%╚═══════════════════════════════════════════════════════════════════════════════════════════════╝%reset% -echo. -set /p "confirmation=Are you sure you want to proceed? [Y/N]: " -if /i "%confirmation%"=="Y" ( - - REM Remove the Conda environment - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Conda enviroment: %cyan_fg_strong%fooocus%reset% - call conda deactivate - call conda remove --name fooocus --all -y - call conda clean -a -y - - REM Remove the folder Fooocus - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Fooocus directory... - cd /d "%~dp0" - rmdir /s /q "%fooocus_install_path%" - - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Fooocus has been uninstalled successfully.%reset% - pause - goto :app_uninstaller_image_generation -) else ( - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstall canceled. - pause - goto :app_uninstaller_image_generation -) diff --git a/bin/functions/Toolbox/Editor/Image_Generation/uninstall_sdwebui.bat b/bin/functions/Toolbox/Editor/Image_Generation/uninstall_sdwebui.bat deleted file mode 100644 index c2c9b15..0000000 --- a/bin/functions/Toolbox/Editor/Image_Generation/uninstall_sdwebui.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off - -:uninstall_sdwebui -title STL [UNINSTALL STABLE DIFUSSION WEBUI] -setlocal enabledelayedexpansion -chcp 65001 > nul - -REM Confirm with the user before proceeding -echo. -echo %red_bg%╔════ DANGER ZONE ══════════════════════════════════════════════════════════════════════════════╗%reset% -echo %red_bg%║ WARNING: This will delete all data of Stable Diffusion web UI ║%reset% -echo %red_bg%║ If you want to keep any data, make sure to create a backup before proceeding. ║%reset% -echo %red_bg%╚═══════════════════════════════════════════════════════════════════════════════════════════════╝%reset% -echo. -set /p "confirmation=Are you sure you want to proceed? [Y/N]: " -if /i "%confirmation%"=="Y" ( - - REM Remove the Conda environment - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Conda enviroment: %cyan_fg_strong%sdwebui%reset% - call conda deactivate - call conda remove --name sdwebui --all -y - call conda clean -a -y - - REM Remove the folder stable-diffusion-webui - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the stable-diffusion-webui directory... - cd /d "%~dp0" - rmdir /s /q "%sdwebui_install_path%" - - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Stable Diffusion web UI has been uninstalled successfully.%reset% - pause - goto :app_uninstaller_image_generation -) else ( - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstall canceled. - pause - goto :app_uninstaller_image_generation -) \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Image_Generation/uninstall_sdwebuiforge.bat b/bin/functions/Toolbox/Editor/Image_Generation/uninstall_sdwebuiforge.bat deleted file mode 100644 index ce2c740..0000000 --- a/bin/functions/Toolbox/Editor/Image_Generation/uninstall_sdwebuiforge.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off - -:uninstall_sdwebuiforge -title STL [UNINSTALL STABLE DIFUSSION WEBUI FORGE] -setlocal enabledelayedexpansion -chcp 65001 > nul - -REM Confirm with the user before proceeding -echo. -echo %red_bg%╔════ DANGER ZONE ══════════════════════════════════════════════════════════════════════════════╗%reset% -echo %red_bg%║ WARNING: This will delete all data of Stable Diffusion web UI Forge ║%reset% -echo %red_bg%║ If you want to keep any data, make sure to create a backup before proceeding. ║%reset% -echo %red_bg%╚═══════════════════════════════════════════════════════════════════════════════════════════════╝%reset% -echo. -set /p "confirmation=Are you sure you want to proceed? [Y/N]: " -if /i "%confirmation%"=="Y" ( - - REM Remove the Conda environment - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Conda enviroment: %cyan_fg_strong%sdwebuiforge%reset% - call conda deactivate - call conda remove --name sdwebuiforge --all -y - call conda clean -a -y - - REM Remove the folder stable-diffusion-webui - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the stable-diffusion-webui-forge directory... - cd /d "%~dp0" - rmdir /s /q "%sdwebuiforge_install_path%" - - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Stable Diffusion web UI Forge has been uninstalled successfully.%reset% - pause - goto :app_uninstaller_image_generation -) else ( - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstall canceled. - pause - goto :app_uninstaller_image_generation -) \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Text_Completion/edit_koboldcpp_modules.bat b/bin/functions/Toolbox/Editor/Text_Completion/edit_koboldcpp_modules.bat new file mode 100644 index 0000000..9a81267 --- /dev/null +++ b/bin/functions/Toolbox/Editor/Text_Completion/edit_koboldcpp_modules.bat @@ -0,0 +1,6 @@ +@echo off + +:edit_koboldcpp_modules +echo COMING SOON +pause +goto :editor_text_completion \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Text_Completion/edit_ooba_modules.bat b/bin/functions/Toolbox/Editor/Text_Completion/edit_ooba_modules.bat new file mode 100644 index 0000000..456cbaf --- /dev/null +++ b/bin/functions/Toolbox/Editor/Text_Completion/edit_ooba_modules.bat @@ -0,0 +1,137 @@ +@echo off + +REM ############################################################ +REM ############## EDIT OOBA MODULES - FRONTEND ################ +REM ############################################################ +:edit_ooba_modules +title STL [EDIT OOBA MODULES] +cls +echo %blue_fg_strong%/ Home / Toolbox / Editor / Text Completion / Edit OOBA Modules%reset% +echo ------------------------------------------------------------- +echo Choose OOBA modules to enable or disable (e.g., "1 2 4" to enable extensions openai, listen, and api-port) + + + +REM Display module options with colors based on their status +call :printModule "1. extensions openai (--extensions openai)" %ooba_extopenai_trigger% +call :printModule "2. listen (--listen)" %ooba_listen_trigger% +call :printModule "3. listen-port (--listen-port 7910)" %ooba_listenport_trigger% +call :printModule "4. api-port (--api-port 7911)" %ooba_apiport_trigger% +call :printModule "5. autolaunch (--autolaunch)" %ooba_autolaunch_trigger% +call :printModule "6. verbose (--verbose)" %ooba_verbose_trigger% + +echo 00. Quick Start Text generation web UI oobabooga +echo 0. Back + +set "python_command=" + +set /p ooba_module_choices=Choose modules to enable/disable: + +REM Handle the user's module choices and construct the Python command +for %%i in (%ooba_module_choices%) do ( + if "%%i"=="1" ( + if "%ooba_extopenai_trigger%"=="true" ( + set "ooba_extopenai_trigger=false" + ) else ( + set "ooba_extopenai_trigger=true" + ) + + ) else if "%%i"=="2" ( + if "%ooba_listen_trigger%"=="true" ( + set "ooba_listen_trigger=false" + ) else ( + set "ooba_listen_trigger=true" + ) + + ) else if "%%i"=="3" ( + if "%ooba_listenport_trigger%"=="true" ( + set "ooba_listenport_trigger=false" + ) else ( + set "ooba_listenport_trigger=true" + ) + + ) else if "%%i"=="4" ( + if "%ooba_apiport_trigger%"=="true" ( + set "ooba_apiport_trigger=false" + ) else ( + set "ooba_apiport_trigger=true" + ) + + ) else if "%%i"=="5" ( + if "%ooba_autolaunch_trigger%"=="true" ( + set "ooba_autolaunch_trigger=false" + ) else ( + set "ooba_autolaunch_trigger=true" + ) + ) else if "%%i"=="6" ( + if "%ooba_verbose_trigger%"=="true" ( + set "ooba_verbose_trigger=false" + ) else ( + set "ooba_verbose_trigger=true" + ) + + ) else if "%%i"=="00" ( + goto :start_ooba + + ) else if "%%i"=="0" ( + goto :editor_text_completion + ) +) + +REM Save the module flags to modules-ooba +echo ooba_extopenai_trigger=%ooba_extopenai_trigger%>%ooba_modules_path% +echo ooba_listen_trigger=%ooba_listen_trigger%>>%ooba_modules_path% +echo ooba_listenport_trigger=%ooba_listenport_trigger%>>%ooba_modules_path% +echo ooba_apiport_trigger=%ooba_apiport_trigger%>>%ooba_modules_path% +echo ooba_autolaunch_trigger=%ooba_autolaunch_trigger%>>%ooba_modules_path% +echo ooba_verbose_trigger=%ooba_verbose_trigger%>>%ooba_modules_path% + + +REM remove modules_enable +set "modules_enable=" + +REM Compile the Python command +set "python_command=start start_windows.bat" +if "%ooba_extopenai_trigger%"=="true" ( + set "python_command=%python_command% --extensions openai" +) +if "%ooba_listen_trigger%"=="true" ( + set "python_command=%python_command% --listen" +) +if "%ooba_listenport_trigger%"=="true" ( + set "python_command=%python_command% --listen-port 7910" +) +if "%ooba_apiport_trigger%"=="true" ( + set "python_command=%python_command% --api-port 7911" +) +if "%ooba_autolaunch_trigger%"=="true" ( + set "python_command=%python_command% --auto-launch" +) +if "%ooba_verbose_trigger%"=="true" ( + set "python_command=%python_command% --verbose" +) + + +REM is modules_enable empty? +if defined modules_enable ( + REM remove last comma + set "modules_enable=%modules_enable:~0,-1%" +) + +REM command completed +if defined modules_enable ( + set "python_command=%python_command% --enable-modules=%modules_enable%" +) + +REM Save the constructed Python command to modules-ooba for testing +echo ooba_start_command=%python_command%>>%ooba_modules_path% +goto :edit_ooba_modules + +REM Function to print module options with color based on their status +:printModule +if "%2"=="true" ( + echo %green_fg_strong%%1 [Enabled]%reset% +) else ( + echo %red_fg_strong%%1 [Disabled]%reset% +) +exit /b \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Text_Completion/edit_tabbyapi_modules.bat b/bin/functions/Toolbox/Editor/Text_Completion/edit_tabbyapi_modules.bat new file mode 100644 index 0000000..79c10a9 --- /dev/null +++ b/bin/functions/Toolbox/Editor/Text_Completion/edit_tabbyapi_modules.bat @@ -0,0 +1,6 @@ +@echo off + +:edit_tabbyapi_modules +echo COMING SOON +pause +goto :editor_text_completion \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Voice_Generation/edit_xtts_modules.bat b/bin/functions/Toolbox/Editor/Voice_Generation/edit_xtts_modules.bat new file mode 100644 index 0000000..d1cf281 --- /dev/null +++ b/bin/functions/Toolbox/Editor/Voice_Generation/edit_xtts_modules.bat @@ -0,0 +1,132 @@ +@echo off + +REM ############################################################ +REM ############## EDIT XTTS MODULES - FRONTEND ################ +REM ############################################################ +:edit_xtts_modules +title STL [EDIT XTTS MODULES] +cls +echo %blue_fg_strong%/ Home / Toolbox / Editor / Edit XTTS Modules%reset% +echo ------------------------------------------------------------- +echo Choose XTTS modules to enable or disable (e.g., "1 2 4" to enable Cuda, hs, and cache) + +REM Display module options with colors based on their status +call :printModule "1. cuda (--device cuda)" %xtts_cuda_trigger% +call :printModule "2. hs (-hs 0.0.0.0)" %xtts_hs_trigger% +call :printModule "3. deepspeed (--deepspeed)" %xtts_deepspeed_trigger% +call :printModule "4. cache (--use-cache)" %xtts_cache_trigger% +call :printModule "5. listen (--listen)" %xtts_listen_trigger% +call :printModule "6. model (--model-source local)" %xtts_model_trigger% +echo 00. Quick Start XTTS +echo 0. Back + +set "python_command=" + +set /p xtts_module_choices=Choose modules to enable/disable: + +REM Handle the user's module choices and construct the Python command +for %%i in (%xtts_module_choices%) do ( + if "%%i"=="1" ( + if "%xtts_cuda_trigger%"=="true" ( + set "xtts_cuda_trigger=false" + ) else ( + set "xtts_cuda_trigger=true" + ) + + ) else if "%%i"=="2" ( + if "%xtts_hs_trigger%"=="true" ( + set "xtts_hs_trigger=false" + ) else ( + set "xtts_hs_trigger=true" + ) + + ) else if "%%i"=="3" ( + if "%xtts_deepspeed_trigger%"=="true" ( + set "xtts_deepspeed_trigger=false" + ) else ( + set "xtts_deepspeed_trigger=true" + ) + + ) else if "%%i"=="4" ( + if "%xtts_cache_trigger%"=="true" ( + set "xtts_cache_trigger=false" + ) else ( + set "xtts_cache_trigger=true" + ) + + ) else if "%%i"=="5" ( + if "%xtts_listen_trigger%"=="true" ( + set "xtts_listen_trigger=false" + ) else ( + set "xtts_listen_trigger=true" + ) + ) else if "%%i"=="6" ( + if "%xtts_model_trigger%"=="true" ( + set "xtts_model_trigger=false" + ) else ( + set "xtts_model_trigger=true" + ) + + ) else if "%%i"=="00" ( + goto :start_xtts + + ) else if "%%i"=="0" ( + goto :editor_voice_generation + ) +) + +REM Save the module flags to modules-xtts +echo xtts_cuda_trigger=%xtts_cuda_trigger%>%xtts_modules_path% +echo xtts_hs_trigger=%xtts_hs_trigger%>>%xtts_modules_path% +echo xtts_deepspeed_trigger=%xtts_deepspeed_trigger%>>%xtts_modules_path% +echo xtts_cache_trigger=%xtts_cache_trigger%>>%xtts_modules_path% +echo xtts_listen_trigger=%xtts_listen_trigger%>>%xtts_modules_path% +echo xtts_model_trigger=%xtts_model_trigger%>>%xtts_modules_path% + +REM remove modules_enable +set "modules_enable=" + +REM Compile the Python command +set "python_command=python -m xtts_api_server" +if "%xtts_cuda_trigger%"=="true" ( + set "python_command=%python_command% --device cuda" +) +if "%xtts_hs_trigger%"=="true" ( + set "python_command=%python_command% -hs 0.0.0.0" +) +if "%xtts_deepspeed_trigger%"=="true" ( + set "python_command=%python_command% --deepspeed" +) +if "%xtts_cache_trigger%"=="true" ( + set "python_command=%python_command% --use-cache" +) +if "%xtts_listen_trigger%"=="true" ( + set "python_command=%python_command% --listen" +) +if "%xtts_model_trigger%"=="true" ( + set "python_command=%python_command% --model-source local" +) + +REM is modules_enable empty? +if defined modules_enable ( + REM remove last comma + set "modules_enable=%modules_enable:~0,-1%" +) + +REM command completed +if defined modules_enable ( + set "python_command=%python_command% --enable-modules=%modules_enable%" +) + +REM Save the constructed Python command to modules-xtts for testing +echo xtts_start_command=%python_command%>>%xtts_modules_path% +goto :edit_xtts_modules + +REM Function to print module options with color based on their status +:printModule +if "%2"=="true" ( + echo %green_fg_strong%%1 [Enabled]%reset% +) else ( + echo %red_fg_strong%%1 [Disabled]%reset% +) +exit /b \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Voice_Generation/uninstall_alltalk.bat b/bin/functions/Toolbox/Editor/Voice_Generation/uninstall_alltalk.bat deleted file mode 100644 index 811f699..0000000 --- a/bin/functions/Toolbox/Editor/Voice_Generation/uninstall_alltalk.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off - -:uninstall_alltalk -title STL [UNINSTALL ALLTALK] -setlocal enabledelayedexpansion -chcp 65001 > nul - -REM Confirm with the user before proceeding -echo. -echo %red_bg%╔════ DANGER ZONE ══════════════════════════════════════════════════════════════════════════════╗%reset% -echo %red_bg%║ WARNING: This will delete all data of AllTalk ║%reset% -echo %red_bg%║ If you want to keep any data, make sure to create a backup before proceeding. ║%reset% -echo %red_bg%╚═══════════════════════════════════════════════════════════════════════════════════════════════╝%reset% -echo. -set /p "confirmation=Are you sure you want to proceed? [Y/N]: " -if /i "%confirmation%"=="Y" ( - - REM Remove the Conda environment - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Conda enviroment: %cyan_fg_strong%alltalk%reset% - call conda deactivate - call conda remove --name alltalk --all -y - call conda clean -a -y - - REM Remove the folder - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the alltalk directory... - cd /d "%~dp0" - rmdir /s /q "%alltalk_install_path%" - - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%AllTalk has been uninstalled successfully.%reset% - pause - goto :app_uninstaller_voice_generation -) else ( - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstall canceled. - pause - goto :app_uninstaller_voice_generation -) \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Voice_Generation/uninstall_rvc.bat b/bin/functions/Toolbox/Editor/Voice_Generation/uninstall_rvc.bat deleted file mode 100644 index cadbbe2..0000000 --- a/bin/functions/Toolbox/Editor/Voice_Generation/uninstall_rvc.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off - -:uninstall_rvc -title STL [UNINSTALL RVC] -setlocal enabledelayedexpansion -chcp 65001 > nul - -REM Confirm with the user before proceeding -echo. -echo %red_bg%╔════ DANGER ZONE ══════════════════════════════════════════════════════════════════════════════╗%reset% -echo %red_bg%║ WARNING: This will delete all data of RVC ║%reset% -echo %red_bg%║ If you want to keep any data, make sure to create a backup before proceeding. ║%reset% -echo %red_bg%╚═══════════════════════════════════════════════════════════════════════════════════════════════╝%reset% -echo. -set /p "confirmation=Are you sure you want to proceed? [Y/N]: " -if /i "%confirmation%"=="Y" ( - - REM Remove the Conda environment - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Conda enviroment: %cyan_fg_strong%rvc%reset% - call conda deactivate - call conda remove --name rvc --all -y - call conda clean -a -y - - REM Remove the folder - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Retrieval-based-Voice-Conversion-WebUI directory... - cd /d "%~dp0" - rmdir /s /q "%rvc_install_path%" - - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%RVC has been uninstalled successfully.%reset% - pause - goto :app_uninstaller_voice_generation -) else ( - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstall canceled. - pause - goto :app_uninstaller_voice_generation -) \ No newline at end of file diff --git a/bin/functions/Toolbox/Editor/Voice_Generation/uninstall_xtts.bat b/bin/functions/Toolbox/Editor/Voice_Generation/uninstall_xtts.bat deleted file mode 100644 index e515dfb..0000000 --- a/bin/functions/Toolbox/Editor/Voice_Generation/uninstall_xtts.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off - -:uninstall_xtts -title STL [UNINSTALL XTTS] -setlocal enabledelayedexpansion -chcp 65001 > nul - -REM Confirm with the user before proceeding -echo. -echo %red_bg%╔════ DANGER ZONE ══════════════════════════════════════════════════════════════════════════════╗%reset% -echo %red_bg%║ WARNING: This will delete all data of XTTS ║%reset% -echo %red_bg%║ If you want to keep any data, make sure to create a backup before proceeding. ║%reset% -echo %red_bg%╚═══════════════════════════════════════════════════════════════════════════════════════════════╝%reset% -echo. -set /p "confirmation=Are you sure you want to proceed? [Y/N]: " -if /i "%confirmation%"=="Y" ( - - REM Remove the Conda environment - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the Conda enviroment: %cyan_fg_strong%xtts%reset% - call conda deactivate - call conda remove --name xtts --all -y - call conda clean -a -y - - REM Remove the folder - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the xtts directory... - cd /d "%~dp0" - rmdir /s /q "%xtts_install_path%" - - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%XTTS has been uninstalled successfully.%reset% - pause - goto :app_uninstaller_voice_generation -) else ( - echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Uninstall canceled. - pause - goto :app_uninstaller_voice_generation -) \ No newline at end of file