-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathrun_webui.bat
More file actions
32 lines (28 loc) · 1.21 KB
/
Copy pathrun_webui.bat
File metadata and controls
32 lines (28 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
setlocal
chcp 65001 >nul
cd /d "%~dp0"
call "%~dp0_env.bat"
REM _env.bat auto-detected BACKEND (cuda|cpu) from the NVIDIA driver + bundled exes;
REM hand it to webui.py unless the user already chose via AUDIOCPP_BACKEND.
if not defined AUDIOCPP_BACKEND (
if /I "%BACKEND%"=="cuda" ( set "AUDIOCPP_BACKEND=gpu" ) else ( set "AUDIOCPP_BACKEND=cpu" )
)
REM Python (with gradio/requests/torch/safetensors/...) is located by _env.bat (PY).
if not exist "%PY%" (
echo [run_webui] no Python with deps found. Looked for:
echo %BUNDLE%\venv\python.exe ^(bundle venv^)
echo %ROOT%\venv\python.exe ^(root venv^)
echo %ROOT%\venv\Scripts\python.exe ^(project venv^)
echo Install into one of them: gradio requests torch safetensors pyyaml huggingface_hub
pause
exit /b 1
)
echo [run_webui] python: %PY%
echo [run_webui] the WebUI starts/switches audiocpp_server on demand
echo [run_webui] pick a model in the UI and click "load" (no need to run run_server.bat)
echo [run_webui] backend: %AUDIOCPP_BACKEND% (auto-detected; override with AUDIOCPP_BACKEND=gpu or cpu)
echo [run_webui] UI -^> http://127.0.0.1:7860
"%PY%" "%WEBUI_DIR%\webui.py"
endlocal
pause