@echo off

echo WARNING. For this auto installer to work you need to have installed Python 3.11, C++, Git, FFmpeg and CUDA
echo This tutorial shows all requirements step by step : https://youtu.be/DrhUHnYfwC0
echo This requirements will help you run all AI apps

set UV_SKIP_WHEEL_FILENAME_CHECK=1
set UV_LINK_MODE=copy

pip install requests

git clone https://github.com/FurkanGozukara/Paints-UNDO

cd Paints-UNDO

git reset --hard

git pull

py --version >nul 2>&1
if "%ERRORLEVEL%" == "0" (
    echo Python launcher is available. Generating Python 3.11 VENV
    py -3.11 -m venv venv
) else (
    echo Python launcher is not available, generating VENV with default Python. Make sure that it is 3.11
    python -m venv venv
)

call .\venv\Scripts\activate.bat

echo installing requirements 

python -m pip install --upgrade pip

pip install uv

uv pip install wheel

cd ..

uv pip install -r requirements_paints_undo.txt  --index-strategy unsafe-best-match
uv pip install -r requirements_onnx_cuda13_deps.txt
uv pip install --prerelease=allow --no-deps -r requirements_onnx_cuda13.txt
uv pip install xformers==0.0.35 --no-deps --index-url https://download.pytorch.org/whl/cu130


REM Show completion message
echo Virtual environment made and installed properly - save logs to send me if any errors occurs

REM Pause to keep the command prompt open
pause
