mirror of
https://github.com/SillyTavern/SillyTavern-Launcher.git
synced 2026-04-30 03:01:33 +00:00
add function to start comfyui
This commit is contained in:
30
Launcher.bat
30
Launcher.bat
@@ -1923,7 +1923,18 @@ if "%app_launcher_image_generation_choice%"=="1" (
|
|||||||
goto :home
|
goto :home
|
||||||
)
|
)
|
||||||
) else if "%app_launcher_image_generation_choice%"=="3" (
|
) else if "%app_launcher_image_generation_choice%"=="3" (
|
||||||
goto :start_comfyui
|
set "caller=app_launcher_image_generation"
|
||||||
|
if exist "%app_launcher_image_generation_dir%\start_comfyui.bat" (
|
||||||
|
call %app_launcher_image_generation_dir%\start_comfyui.bat
|
||||||
|
goto :home
|
||||||
|
) else (
|
||||||
|
echo [%DATE% %TIME%] ERROR: start_comfyui.bat not found in: app_launcher_image_generation_dir% >> %logs_stl_console_path%
|
||||||
|
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] start_comfyui.bat not found in: %app_launcher_image_generation_dir%%reset%
|
||||||
|
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Automatic Repair...
|
||||||
|
git pull
|
||||||
|
pause
|
||||||
|
goto :home
|
||||||
|
)
|
||||||
) else if "%app_launcher_image_generation_choice%"=="4" (
|
) else if "%app_launcher_image_generation_choice%"=="4" (
|
||||||
goto :start_fooocus
|
goto :start_fooocus
|
||||||
) else if "%app_launcher_image_generation_choice%"=="5" (
|
) else if "%app_launcher_image_generation_choice%"=="5" (
|
||||||
@@ -1949,23 +1960,6 @@ if "%app_launcher_image_generation_choice%"=="1" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:start_comfyui
|
|
||||||
REM Run conda activate from the Miniconda installation
|
|
||||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Miniconda environment...
|
|
||||||
call "%miniconda_path%\Scripts\activate.bat"
|
|
||||||
|
|
||||||
REM Activate the comfyui environment
|
|
||||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Conda environment: %cyan_fg_strong%comfyui%reset%
|
|
||||||
call conda activate comfyui
|
|
||||||
|
|
||||||
REM Start ComfyUI with desired configurations
|
|
||||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% ComfyUI launched in a new window.
|
|
||||||
start cmd /k "title ComfyUI && cd /d %comfyui_install_path% && python main.py --auto-launch --listen --port 7901"
|
|
||||||
goto :home
|
|
||||||
|
|
||||||
|
|
||||||
:start_fooocus
|
:start_fooocus
|
||||||
REM Run conda activate from the Miniconda installation
|
REM Run conda activate from the Miniconda installation
|
||||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Miniconda environment...
|
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Miniconda environment...
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
:start_comfyui
|
||||||
|
cd /d "%comfyui_install_path%"
|
||||||
|
|
||||||
|
REM Run conda activate from the Miniconda installation
|
||||||
|
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Miniconda environment...
|
||||||
|
call "%miniconda_path%\Scripts\activate.bat"
|
||||||
|
|
||||||
|
REM Activate the comfyui environment
|
||||||
|
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Conda environment: %cyan_fg_strong%comfyui%reset%
|
||||||
|
call conda activate comfyui
|
||||||
|
|
||||||
|
REM Read modules-comfyui and find the comfyui_start_command line
|
||||||
|
set "comfyui_start_command="
|
||||||
|
|
||||||
|
for /F "tokens=*" %%a in ('findstr /I "comfyui_start_command=" "%comfyui_modules_path%"') do (
|
||||||
|
set "%%a"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not defined comfyui_start_command (
|
||||||
|
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] No modules enabled.%reset%
|
||||||
|
echo %red_bg%Please make sure you enabled at least one of the modules from Edit comfyui Modules.%reset%
|
||||||
|
echo.
|
||||||
|
echo %blue_bg%We will redirect you to the Edit comfyui Modules menu.%reset%
|
||||||
|
pause
|
||||||
|
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 :home
|
||||||
|
) 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%
|
||||||
|
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Automatic Repair...
|
||||||
|
git pull
|
||||||
|
pause
|
||||||
|
goto :home
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
set "comfyui_start_command=%comfyui_start_command:comfyui_start_command=%"
|
||||||
|
|
||||||
|
REM Start ComfyUI with desired configurations
|
||||||
|
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% ComfyUI launched in a new window.
|
||||||
|
start cmd /k "title comfyui && cd /d %comfyui_install_path% && %comfyui_start_command%"
|
||||||
|
goto :home
|
||||||
@@ -16,7 +16,7 @@ call :printModule "2. Port (--port 7969)" %comfyui_port_trigger%
|
|||||||
call :printModule "3. Listen (--listen)" %comfyui_listen_trigger%
|
call :printModule "3. Listen (--listen)" %comfyui_listen_trigger%
|
||||||
call :printModule "4. Low VRAM (--lowvram)" %comfyui_lowvram_trigger%
|
call :printModule "4. Low VRAM (--lowvram)" %comfyui_lowvram_trigger%
|
||||||
call :printModule "5. Med VRAM (--medvram)" %comfyui_medvram_trigger%
|
call :printModule "5. Med VRAM (--medvram)" %comfyui_medvram_trigger%
|
||||||
echo 00. Quick Start Stable Diffusion WebUI
|
echo 00. Quick Start ComfyUI
|
||||||
echo 0. Back
|
echo 0. Back
|
||||||
|
|
||||||
set "python_command="
|
set "python_command="
|
||||||
@@ -91,7 +91,7 @@ REM remove modules_enable
|
|||||||
set "modules_enable="
|
set "modules_enable="
|
||||||
|
|
||||||
REM Compile the Python command
|
REM Compile the Python command
|
||||||
set "python_command=python launch.py"
|
set "python_command=python main.py"
|
||||||
if "%comfyui_disableautolaunch_trigger%"=="true" (
|
if "%comfyui_disableautolaunch_trigger%"=="true" (
|
||||||
set "python_command=%python_command% --disable-auto-launch"
|
set "python_command=%python_command% --disable-auto-launch"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user