Set autorepair of ST launch to NO by default

Fixes missing log issues for users with slow internet

Fixed the info_vram bat that was broken due to bad merged contributor code. Little less info than before but the core works at least.
This commit is contained in:
Blueprint Coding
2024-12-19 19:11:51 -07:00
parent b43e03974f
commit e6f1724420
3 changed files with 86 additions and 20 deletions

View File

@@ -231,10 +231,12 @@ set "editor_voice_generation_dir=%functions_dir%\Toolbox\Editor\Voice_Generation
set "editor_core_utilities_dir=%functions_dir%\Toolbox\Editor\Core_Utilities" set "editor_core_utilities_dir=%functions_dir%\Toolbox\Editor\Core_Utilities"
REM Define variables for logging REM Define variables for logging
set "st_auto_repair=%log_dir%\autorepair-setting.txt"
set "logs_stl_console_path=%log_dir%\stl.log" set "logs_stl_console_path=%log_dir%\stl.log"
set "logs_st_console_path=%log_dir%\st_console_output.log" set "logs_st_console_path=%log_dir%\st_console_output.log"
REM Create the logs folder if it doesn't exist REM Create the logs folder if it doesn't exist
if not exist "%log_dir%" ( if not exist "%log_dir%" (
mkdir "%log_dir%" mkdir "%log_dir%"
@@ -487,7 +489,8 @@ for /f "tokens=2 delims==" %%f in ('wmic path Win32_VideoController get name /va
if /i !lastUVRAM! neq !UVRAM! ( if /i !lastUVRAM! neq !UVRAM! (
if /i !lastUVRAM! gtr !UVRAM! ( if /i !lastUVRAM! gtr !UVRAM! (
set "UVRAM=!lastUVRAM!" set "UVRAM=!lastUVRAM!"
set "GPU_name=!last_GPU!" @REM set "GPU_name=!last_GPU!"
) )
) )
) else ( ) else (
@@ -694,7 +697,7 @@ if "%choice%"=="1" (
) else if "%choice%"=="8" ( ) else if "%choice%"=="8" (
set "caller=home" set "caller=home"
if exist "%functions_dir%\Home\info_vram.bat" ( if exist "%functions_dir%\Home\info_vram.bat" (
call %functions_dir%\Home\info_vram.bat call "%functions_dir%\Home\info_vram.bat" "%UVRAM%"
goto :home goto :home
) else ( ) else (
echo [%DATE% %TIME%] ERROR: info_vram.bat not found in: %functions_dir%\Home >> %logs_stl_console_path% echo [%DATE% %TIME%] ERROR: info_vram.bat not found in: %functions_dir%\Home >> %logs_stl_console_path%
@@ -4447,12 +4450,24 @@ REM ############################################################
REM ########## TROUBLESHOOTING & SUPPORT - FRONTEND ############ REM ########## TROUBLESHOOTING & SUPPORT - FRONTEND ############
REM ############################################################ REM ############################################################
:troubleshooting :troubleshooting
setlocal enabledelayedexpansion
REM Check auto-repair setting
if not exist "%log_dir%\autorepair-setting.txt" (
echo NO > "%log_dir%\autorepair-setting.txt"
)
for /f "tokens=1 delims= " %%a in ('type "%log_dir%\autorepair-setting.txt"') do set "st_auto_repair=%%a"
if /i "%st_auto_repair%"=="YES" (
set "autorepair_status=Enabled"
) else (
set "autorepair_status=Disabled"
)
title STL [TROUBLE ^& SUPPORT] title STL [TROUBLE ^& SUPPORT]
@echo off @echo off
cls cls
echo %blue_fg_strong%^| ^> / Home / Troubleshooting ^& Support ^|%reset% echo %blue_fg_strong%^| ^> / Home / Troubleshooting ^& Support ^|%reset%
echo %blue_fg_strong% ==============================================================%reset% echo %blue_fg_strong% ==============================================================%reset%
setlocal enabledelayedexpansion
REM Call the VPN detection script REM Call the VPN detection script
call "%troubleshooting_dir%\detect_vpn.bat" > "%log_dir%\vpn_status.txt" call "%troubleshooting_dir%\detect_vpn.bat" > "%log_dir%\vpn_status.txt"
@@ -4461,7 +4476,7 @@ del "%log_dir%\vpn_status.txt"
REM Call the home port check script REM Call the home port check script
call "%troubleshooting_dir%\home_port_check.bat" > "%log_dir%\port_8000_status.txt" call "%troubleshooting_dir%\home_port_check.bat" > "%log_dir%\port_8000_status.txt"
set /p "portStatus="<"%log_dir%\port_8000_status.txt set /p "portStatus="<"%log_dir%\port_8000_status.txt"
del "%log_dir%\port_8000_status.txt" del "%log_dir%\port_8000_status.txt"
REM Get the current Git branch REM Get the current Git branch
@@ -4509,11 +4524,12 @@ echo 4. Fix unresolved conflicts or unmerged files [SillyTavern]
echo 5. Export dxdiag info echo 5. Export dxdiag info
echo 6. Find what app is using port echo 6. Find what app is using port
echo 7. Set Onboarding Flow echo 7. Set Onboarding Flow
echo 8. Toggle Logging/Auto-repair (Current: %cyan_fg_strong%!autorepair_status!%reset%)
echo %cyan_fg_strong% ______________________________________________________________%reset% echo %cyan_fg_strong% ______________________________________________________________%reset%
echo %cyan_fg_strong%^| Support Options: ^|%reset% echo %cyan_fg_strong%^| Support Options: ^|%reset%
echo 8. Report an Issue echo 9. Report an Issue
echo 9. SillyTavern Documentation echo 10. SillyTavern Documentation
echo 10. Discord servers echo 11. Discord servers
echo %cyan_fg_strong% ______________________________________________________________%reset% echo %cyan_fg_strong% ______________________________________________________________%reset%
echo %cyan_fg_strong%^| Menu Options: ^|%reset% echo %cyan_fg_strong%^| Menu Options: ^|%reset%
echo 0. Back echo 0. Back
@@ -4528,7 +4544,6 @@ for /f %%A in ('"prompt $H &echo on &for %%B in (1) do rem"') do set "BS=%%A"
set /p "troubleshooting_choice=%BS% Choose Your Destiny: " set /p "troubleshooting_choice=%BS% Choose Your Destiny: "
REM ############## TROUBLESHOOTING - BACKEND ################## REM ############## TROUBLESHOOTING - BACKEND ##################
if "%troubleshooting_choice%"=="1" ( if "%troubleshooting_choice%"=="1" (
set "caller=troubleshooting" set "caller=troubleshooting"
@@ -4608,10 +4623,20 @@ if "%troubleshooting_choice%"=="1" (
goto :troubleshooting goto :troubleshooting
) )
) else if "%troubleshooting_choice%"=="8" ( ) else if "%troubleshooting_choice%"=="8" (
call :issue_report for /f "tokens=1 delims= " %%a in ('type "%log_dir%\autorepair-setting.txt"') do set "st_auto_repair=%%a"
if /i "%st_auto_repair%"=="YES" (
echo NO > "%log_dir%\autorepair-setting.txt"
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Auto-repair and logging disabled.
) else (
echo YES > "%log_dir%\autorepair-setting.txt"
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Auto-repair and logging enabled.
)
goto :troubleshooting
) else if "%troubleshooting_choice%"=="9" ( ) else if "%troubleshooting_choice%"=="9" (
call :documentation call :issue_report
) else if "%troubleshooting_choice%"=="10" ( ) else if "%troubleshooting_choice%"=="10" (
call :documentation
) else if "%troubleshooting_choice%"=="11" (
set "caller=troubleshooting" set "caller=troubleshooting"
if exist "%troubleshooting_dir%\Support\discord.bat" ( if exist "%troubleshooting_dir%\Support\discord.bat" (
call %troubleshooting_dir%\Support\discord.bat call %troubleshooting_dir%\Support\discord.bat
@@ -4648,6 +4673,7 @@ start "" "https://docs.sillytavern.app/"
goto :troubleshooting goto :troubleshooting
REM ############################################################ REM ############################################################
REM ############## SWITCH BRANCH - FRONTEND #################### REM ############## SWITCH BRANCH - FRONTEND ####################
REM ############################################################ REM ############################################################

View File

@@ -1,25 +1,38 @@
@echo off @echo off
:info_vram :info_vram
title STL [VRAM INFO] title STL [VRAM INFO]
chcp 65001 > nul chcp 65001 > nul
setlocal enabledelayedexpansion setlocal enabledelayedexpansion
REM Get GPU information
for /f "skip=1 delims=" %%i in ('wmic path win32_videocontroller get caption') do (
set "gpu_info=!gpu_info! %%i" REM Confirm script start and input arguments
set "UVRAM=%~1"
REM Handle undefined or invalid UVRAM
if not defined UVRAM (
echo DEBUG: UVRAM is not defined. Defaulting to 0.
set "UVRAM=0"
) else if "%UVRAM%"=="Property not found" (
echo DEBUG: UVRAM could not be detected. Defaulting to 0.
set "UVRAM=0"
) )
REM Get GPU information safely
set "gpu_info="
for /f "skip=1 delims=" %%i in ('wmic path win32_videocontroller get caption') do (
if not "%%i"=="" set "gpu_info=!gpu_info! %%i"
)
cls cls
echo %blue_fg_strong%^| ^> / Home / VRAM ^& LLM Info ^|%reset% echo %blue_fg_strong%^| ^> / Home / VRAM ^& LLM Info ^|%reset%
echo %blue_fg_strong% ======================================================================================================%reset% echo %blue_fg_strong% ======================================================================================================%reset%
REM Recommendations Based on VRAM Size REM Recommendations Based on VRAM Size
if %UVRAM% lss 8 ( if %UVRAM% lss 8 (
echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset% @REM echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset%
echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - It's recommended to stick with APIs like OpenAI, Claude or OpenRouter for LLM usage, echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - It's recommended to stick with APIs like OpenAI, Claude or OpenRouter for LLM usage,
echo Local models will result in memory error or perform a REAL SLOW output echo Local models will result in memory error or perform a REAL SLOW output
) else if %UVRAM% lss 12 ( ) else if %UVRAM% lss 12 (
echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset% @REM echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset%
echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - Great for 7B and 8B models. Check info below for BPW echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - Great for 7B and 8B models. Check info below for BPW
endlocal endlocal
echo. echo.
@@ -42,7 +55,7 @@ if %UVRAM% lss 8 (
echo ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝ echo ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
echo. echo.
) else if %UVRAM% lss 22 ( ) else if %UVRAM% lss 22 (
echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset% @REM echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset%
echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - Great for 7B, 8B and 13B models. Check info below for BPW echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - Great for 7B, 8B and 13B models. Check info below for BPW
endlocal endlocal
echo. echo.
@@ -65,7 +78,7 @@ if %UVRAM% lss 8 (
echo ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝ echo ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
echo. echo.
) else if %UVRAM% lss 25 ( ) else if %UVRAM% lss 25 (
echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset% @REM echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset%
echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - Great for 7B, 8B, 13B and 30B models, Check info below for BPW echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - Great for 7B, 8B, 13B and 30B models, Check info below for BPW
endlocal endlocal
echo. echo.
@@ -88,7 +101,7 @@ if %UVRAM% lss 8 (
echo ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝ echo ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
echo. echo.
) else if %UVRAM% gtr 25 ( ) else if %UVRAM% gtr 25 (
echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset% @REM echo %cyan_fg_strong%GPU: %gpu_info:~1%%reset%
echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - Great for 7B, 8B, 13B, 30B and 70B models. Check info below for BPW echo %cyan_fg_strong%GPU VRAM: %UVRAM% GB%reset% - Great for 7B, 8B, 13B, 30B and 70B models. Check info below for BPW
endlocal endlocal
echo. echo.

View File

@@ -40,6 +40,33 @@ if exist "%SSL_INFO_FILE%" (
) )
) )
REM Debugging: Check auto-repair setting
if not exist "%log_dir%\autorepair-setting.txt" (
echo NO > "%log_dir%\autorepair-setting.txt"
)
REM Read and sanitize autorepair-setting.txt
set "st_auto_repair="
for /f "tokens=*" %%a in ('type "%log_dir%\autorepair-setting.txt" 2^>nul ^| findstr /v "^$"') do set "st_auto_repair=%%a"
REM Remove leading/trailing spaces and validate value
set "st_auto_repair=!st_auto_repair: =!"
if /i "!st_auto_repair!" neq "YES" if /i "!st_auto_repair!" neq "NO" (
set "st_auto_repair=NO"
)
REM Conditional Logic Based on st_auto_repair
if "%st_auto_repair%"=="YES" (
echo DEBUG: Entered the YES block
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Auto-repair process enabled [this can be toggled in the troubleshooting menu].
goto :ST_SSL_Start
) else (
echo DEBUG: Entered the NO block
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Auto-repair disabled [this can be toggled in the troubleshooting menu]. Launching SillyTavern normally...
goto :fallback
)
:ST_SSL_Start :ST_SSL_Start
if "%sslPathsFound%"=="true" ( if "%sslPathsFound%"=="true" (
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% SillyTavern opened with SSL in a new window. echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% SillyTavern opened with SSL in a new window.
@@ -72,7 +99,7 @@ goto :scan_log
:fallback :fallback
REM Fallback to %st_install_path% and start REM Fallback to %st_install_path% and start
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Fallback: Starting SillyTavern from %st_install_path%... echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Starting SillyTavern from %st_install_path%...
start cmd /k "title SillyTavern && cd /d %st_install_path% && call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev && call Start.bat" start cmd /k "title SillyTavern && cd /d %st_install_path% && call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev && call Start.bat"
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% SillyTavern should now be launching in a new window, if you still receive errors please contact the launcher devs in the #launcher-help channel on discord. echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% SillyTavern should now be launching in a new window, if you still receive errors please contact the launcher devs in the #launcher-help channel on discord.
timeout /t 10 timeout /t 10