forked from bmaltais/kohya_ss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverting changes to startup commands
- Loading branch information
Showing
2 changed files
with
6 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |