Reverting changes to startup commands
This commit is contained in:
parent
7bc93821a0
commit
56d171c55b
23
gui.bat
23
gui.bat
@ -1,23 +1,10 @@
|
||||
@echo off
|
||||
|
||||
REM Use this batch file with the following options:
|
||||
REM -inbrowser - To launch the program in the browser
|
||||
REM -server_port [port number] - To specify the server port
|
||||
set VENV_DIR=.\venv
|
||||
set PYTHON=python
|
||||
|
||||
set inbrowserOption=
|
||||
set serverPortOption=
|
||||
call %VENV_DIR%\Scripts\activate.bat
|
||||
|
||||
if "%1" == "-server_port" (
|
||||
set serverPortOption=--server_port %2
|
||||
if "%3" == "-inbrowser" (
|
||||
set inbrowserOption=--inbrowser
|
||||
)
|
||||
) else if "%1" == "-inbrowser" (
|
||||
set inbrowserOption=--inbrowser
|
||||
if "%2" == "-server_port" (
|
||||
set serverPortOption=--server_port %3
|
||||
)
|
||||
)
|
||||
%PYTHON% kohya_gui.py
|
||||
|
||||
call .\venv\Scripts\activate.bat
|
||||
python.exe kohya_gui.py %inbrowserOption% %serverPortOption%
|
||||
pause
|
11
gui.ps1
11
gui.ps1
@ -1,11 +1,2 @@
|
||||
# Example command: .\gui.ps1 -server_port 8000 -inbrowser
|
||||
|
||||
param([string]$username="", [string]$password="", [switch]$inbrowser, [int]$server_port)
|
||||
.\venv\Scripts\activate
|
||||
|
||||
if ($server_port -le 0 -and $inbrowser -eq $false) {
|
||||
Write-Host "Error: You must provide either the --server_port or --inbrowser argument."
|
||||
exit 1
|
||||
}
|
||||
|
||||
python.exe kohya_gui.py --username $username --password $password --server_port $server_port --inbrowser
|
||||
python.exe kohya_gui.py
|
Loading…
Reference in New Issue
Block a user