mirror of
https://github.com/SillyTavern/SillyTavern-Launcher.git
synced 2026-04-30 19:21:22 +00:00
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:
@@ -1,25 +1,38 @@
|
||||
@echo off
|
||||
|
||||
:info_vram
|
||||
title STL [VRAM INFO]
|
||||
chcp 65001 > nul
|
||||
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
|
||||
echo %blue_fg_strong%^| ^> / Home / VRAM ^& LLM Info ^|%reset%
|
||||
echo %blue_fg_strong% ======================================================================================================%reset%
|
||||
REM Recommendations Based on VRAM Size
|
||||
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 Local models will result in memory error or perform a REAL SLOW output
|
||||
) 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
|
||||
endlocal
|
||||
echo.
|
||||
@@ -42,7 +55,7 @@ if %UVRAM% lss 8 (
|
||||
echo ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
|
||||
echo.
|
||||
) 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
|
||||
endlocal
|
||||
echo.
|
||||
@@ -65,7 +78,7 @@ if %UVRAM% lss 8 (
|
||||
echo ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
|
||||
echo.
|
||||
) 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
|
||||
endlocal
|
||||
echo.
|
||||
@@ -88,7 +101,7 @@ if %UVRAM% lss 8 (
|
||||
echo ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
|
||||
echo.
|
||||
) 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
|
||||
endlocal
|
||||
echo.
|
||||
|
||||
@@ -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
|
||||
if "%sslPathsFound%"=="true" (
|
||||
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
|
||||
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"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user