launcher upgrades

+added forge back since Forge became active after a while
This commit is contained in:
deffcolony
2024-08-15 12:36:32 +02:00
parent 839e5c7888
commit 59c50f25cc
3 changed files with 121 additions and 119 deletions

View File

@@ -1,11 +1,13 @@
@echo off
:install_sdwebuireforge
title STL [INSTALL SDWEBUI REFORGE]
:install_sdwebuiforge
title STL [INSTALL SDWEBUI FORGE]
cls
echo %blue_fg_strong%/ Home / Toolbox / App Installer / Text Completion / Install Stable Diffusion web UI reForge%reset%
echo %blue_fg_strong%/ Home / Toolbox / App Installer / Text Completion / Install Stable Diffusion web UI forge%reset%
echo -------------------------------------------------------------
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing Stable Diffusion web UI reForge...
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% forge now just installs Forge or stable-diffusion-webui-forge because forge is
pause
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing Stable Diffusion web UI forge...
REM Check if the folder exists
if not exist "%image_generation_dir%" (
@@ -19,36 +21,36 @@ cd /d "%image_generation_dir%"
set max_retries=3
set retry_count=0
:retry_install_sdwebuireforge
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Cloning the stable-diffusion-webui-reForge repository...
git clone https://github.com/Panchovix/stable-diffusion-webui-reForge.git
:retry_install_sdwebuiforge
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Cloning the stable-diffusion-webui-forge repository...
git clone https://github.com/Panchovix/stable-diffusion-webui-forge.git
if %errorlevel% neq 0 (
set /A retry_count+=1
echo %yellow_bg%[%time%]%reset% %yellow_fg_strong%[WARN] Retry %retry_count% of %max_retries%%reset%
if %retry_count% lss %max_retries% goto :retry_install_sdwebuireforge
if %retry_count% lss %max_retries% goto :retry_install_sdwebuiforge
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Failed to clone repository after %max_retries% retries.%reset%
pause
goto :app_installer_image_generation
)
cd /d "%sdwebuireforge_install_path%"
cd /d "%sdwebuiforge_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 Create a Conda environment named sdwebuireforge
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Creating Conda environment: %cyan_fg_strong%sdwebuireforge%reset%
call conda create -n sdwebuireforge python=3.10.6 -y
REM Create a Conda environment named sdwebuiforge
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Creating Conda environment: %cyan_fg_strong%sdwebuiforge%reset%
call conda create -n sdwebuiforge python=3.10.6 -y
REM Activate the sdwebuireforge environment
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Conda environment: %cyan_fg_strong%sdwebuireforge%reset%
call conda activate sdwebuireforge
REM Activate the sdwebuiforge environment
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Activating Conda environment: %cyan_fg_strong%sdwebuiforge%reset%
call conda activate sdwebuiforge
REM Install pip requirements
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing pip requirements
pip install civitdl
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Stable Diffusion WebUI reForge installed Successfully.%reset%
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Stable Diffusion WebUI forge installed Successfully.%reset%
pause
goto :install_sdwebuireforge_menu
goto :install_sdwebuiforge_menu

View File

@@ -1,14 +1,14 @@
@echo off
:uninstall_sdwebuireforge
title STL [UNINSTALL SDWEBUI REFORGE]
:uninstall_sdwebuiforge
title STL [UNINSTALL SDWEBUI 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 reForge ║%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.
@@ -16,17 +16,17 @@ 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%sdwebuireforge%reset%
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 sdwebuireforge --all -y
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-reforge directory...
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Removing the stable-diffusion-webui-forge directory...
cd /d "%~dp0"
rmdir /s /q "%sdwebuireforge_install_path%"
rmdir /s /q "%sdwebuiforge_install_path%"
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Stable Diffusion web UI reForge has been uninstalled successfully.%reset%
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 (