Xeno443 commited on
Commit
e67795a
·
verified ·
1 Parent(s): 873254f

Updated all files

Browse files
runscripts/environment.bat CHANGED
@@ -6,5 +6,18 @@ set PY_LIBS=%DIR%\python\Scripts\Lib;%DIR%\python\Scripts\Lib\site-packages
6
  set PY_PIP=%DIR%\python\Scripts
7
  set SKIP_VENV=1
8
  set PIP_INSTALLER_LOCATION=%DIR%\python\get-pip.py
9
- REM set TRANSFORMERS_CACHE=%DIR%\transformers-cache
10
- set HF_HOME=%DIR%\transformers-cache
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  set PY_PIP=%DIR%\python\Scripts
7
  set SKIP_VENV=1
8
  set PIP_INSTALLER_LOCATION=%DIR%\python\get-pip.py
9
+ set HF_HOME=%DIR%\transformers-cache
10
+
11
+ if /I "%~1"=="passive" (
12
+ REM we just set the env vars and return
13
+ goto :EOF
14
+ )
15
+
16
+ ECHO.
17
+ ECHO ===================================================================
18
+ ECHO Use this command prompt to modify the embbedded Python environment.
19
+ ECHO ===================================================================
20
+ PUSHD system\python
21
+ cmd.exe
22
+ POPD
23
+ EXIT
runscripts/get-models.bat CHANGED
@@ -1,4 +1,5 @@
1
  @ECHO OFF
 
2
  ECHO.
3
  ECHO This script will download different models for Upscale, ADetailer and ControlNet.
4
  PAUSE
 
1
  @ECHO OFF
2
+ call environment.bat passive
3
  ECHO.
4
  ECHO This script will download different models for Upscale, ADetailer and ControlNet.
5
  PAUSE
runscripts/run.bat CHANGED
@@ -1,6 +1,7 @@
1
  @echo off
2
 
3
- call environment.bat
4
 
5
  cd %~dp0webui
 
6
  call webui-user.bat
 
1
  @echo off
2
 
3
+ call environment.bat passive
4
 
5
  cd %~dp0webui
6
+ ECHO Launching webui ...
7
  call webui-user.bat
runscripts/switch-branch.bat CHANGED
@@ -1,55 +1,66 @@
1
- @echo off
2
- call environment.bat
3
-
4
- :ask_branch
5
- echo.
6
- echo Which branch do you want to switch to?
7
- echo 1 = main
8
- echo 2 = dev
9
- echo 3 = dev2
10
- echo 4 = newmain_newforge
11
- echo 5 = newforge_dendev
12
-
13
- set /p PT_CHOICE=Enter choice:
14
-
15
- if "%PT_CHOICE%"=="1" (
16
- SET cbranch=main
17
- GOTO :pullit
18
- )
19
- if "%PT_CHOICE%"=="2" (
20
- SET cbranch=dev
21
- GOTO :pullit
22
- )
23
- if "%PT_CHOICE%"=="3" (
24
- SET cbranch=dev2
25
- GOTO :pullit
26
- )
27
- if "%PT_CHOICE%"=="4" (
28
- SET cbranch=newmain_newforge
29
- GOTO :pullit
30
- )
31
- if "%PT_CHOICE%"=="5" (
32
- SET cbranch=newforge_dendev
33
- GOTO :pullit
34
- )
35
-
36
- echo Invalid choice.
37
- GOTO ask_branch
38
-
39
-
40
- :pullit
41
- ECHO Switching to branch %cbranch% ...
42
- git -C "%~dp0webui" checkout %cbranch%
43
-
44
- ECHO Pulling files ...
45
- git -C "%~dp0webui" pull
46
- if %ERRORLEVEL% == 0 goto :done
47
-
48
- ECHO Conflict detected, trying hard reset and pull ...
49
- git -C "%~dp0webui" reset --hard
50
- git -C "%~dp0webui" pull
51
-
52
- :done
53
- ECHO finished
54
- pause
55
-
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ call environment.bat passive
3
+ pushd "%~dp0\webui"
4
+
5
+ echo Fetching latest remote branches...
6
+ git fetch --all >nul 2>&1
7
+
8
+ setlocal enabledelayedexpansion
9
+
10
+ :choose_branch
11
+ cls
12
+
13
+ set "current_branch="
14
+ for /f "delims=" %%C in ('git rev-parse --abbrev-ref HEAD 2^>nul') do set "current_branch=%%C"
15
+
16
+ if not defined current_branch (
17
+ echo Current branch: [no branch information available]
18
+ ) else if /i "!current_branch!"=="HEAD" (
19
+ echo Current branch: [detached HEAD]
20
+ ) else (
21
+ echo Current branch: !current_branch!
22
+ )
23
+ echo.
24
+ echo Available branches:
25
+ echo.
26
+
27
+ set idx=0
28
+ for /f "tokens=1" %%B in ('git branch -r ^| findstr /i /v "origin/HEAD"') do (
29
+ set "branchName=%%B"
30
+ set "branchName=!branchName:origin/=!"
31
+ set /a idx+=1
32
+ set "branch[!idx!]=!branchName!"
33
+ echo !idx!. !branchName!
34
+ )
35
+
36
+ echo.
37
+ echo Enter a branch number to checkout, or X to exit.
38
+ set /p choice="Choice: "
39
+
40
+ :: Exit option
41
+ if /i "%choice%"=="X" goto :end
42
+
43
+ :: Validate numeric selection
44
+ if not defined branch[%choice%] (
45
+ echo Invalid selection. Please try again.
46
+ pause
47
+ goto :choose_branch
48
+ )
49
+
50
+ set "selected=!branch[%choice%]!"
51
+ echo.
52
+ echo Switching to branch %selected% ...
53
+ git checkout %selected%
54
+
55
+ echo Pulling files ...
56
+ git pull
57
+ if %ERRORLEVEL% neq 0 (
58
+ echo Conflict detected, trying hard reset and pull ...
59
+ git reset --hard
60
+ git pull
61
+ )
62
+
63
+ :end
64
+ endlocal
65
+ popd
66
+ pause
runscripts/update.bat CHANGED
@@ -1,6 +1,6 @@
1
  @echo off
2
 
3
- call environment.bat
4
 
5
  git -C "%~dp0webui" pull 2>NUL
6
  if %ERRORLEVEL% == 0 goto :done
 
1
  @echo off
2
 
3
+ call environment.bat passive
4
 
5
  git -C "%~dp0webui" pull 2>NUL
6
  if %ERRORLEVEL% == 0 goto :done