Spaces:
Running
Running
File size: 1,042 Bytes
c7f95a6 |
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 33 34 35 36 37 38 |
@echo off
setlocal
echo Starting FastSD CPU env installation...
set "PYTHON_COMMAND=python"
call python --version > nul 2>&1
if %errorlevel% equ 0 (
echo Python command check :OK
) else (
echo "Error: Python command not found,please install Python(Recommended : Python 3.10 or Python 3.11) and try again."
pause
exit /b 1
)
call uv --version > nul 2>&1
if %errorlevel% equ 0 (
echo uv command check :OK
) else (
echo "Error: uv command not found,please install it using "pip install uv" command,for termux "pkg install uv" and try again."
pause
exit /b 1
)
:check_python_version
for /f "tokens=2" %%I in ('%PYTHON_COMMAND% --version 2^>^&1') do (
set "python_version=%%I"
)
echo Python version: %python_version%
uv venv --python 3.11.6 "%~dp0env"
call "%~dp0env\Scripts\activate.bat" && uv pip install torch --index-url https://download.pytorch.org/whl/cpu
call "%~dp0env\Scripts\activate.bat" && uv pip install -r "%~dp0requirements.txt"
echo FastSD CPU env installation completed.
pause |