File size: 722 Bytes
6177cfc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@echo off
chcp 65001 > NUL
pushd %~dp0..\..\..\

if "%~1" == "" (
	echo [ERROR] G_*000.pth のモデルファイルをドラッグ&ドロップしてください。
	pause & popd & exit /b 1
)

call venv\Scripts\activate.bat
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )

set PS_CMD=PowerShell -Version 5.1 -ExecutionPolicy Bypass
%PS_CMD% "&{(Get-Content '%~dp0..\config.yml' -Encoding UTF8) -replace 'models/G_.*\.pth', 'models/%~n1.pth' | Set-Content '%~dp0..\config.yml' -Encoding UTF8 }"

copy /Y %~dp0..\config.yml config.yml > NUL
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )

python webui.py
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )

popd rem %~dp0..\..\..\