Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- REM Define variables
- set "SCRIPT_DIR=%~dp0"
- set "INSIGHTFACE_WHEEL_URL=https://github.com/Gourieff/Assets/raw/main/Insightface/insightface-0.7.3-cp312-cp312-win_amd64.whl"
- set "INSIGHTFACE_WHEEL_FILE=%SCRIPT_DIR%insightface-0.7.3-cp312-cp312-win_amd64.whl"
- set "INSWAPPER_URL=https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128.onnx"
- set "INSWAPPER_FILE=%SCRIPT_DIR%models\inswapper_128.onnx"
- set "MODELS_DIR=%SCRIPT_DIR%models\insightface"
- REM Download insightface wheel file
- echo Downloading insightface wheel file...
- powershell -Command "Invoke-WebRequest -Uri %INSIGHTFACE_WHEEL_URL% -OutFile %INSIGHTFACE_WHEEL_FILE%"
- REM Activate the virtual environment
- echo Activating virtual environment...
- call venv\Scripts\activate
- REM Upgrade Pip
- echo Upgrading Pip...
- python -m pip install -U pip
- REM Install insightface package
- echo Installing insightface...
- pip install %INSIGHTFACE_WHEEL_FILE%
- REM Create models directory if it doesn't exist
- echo Creating models directory...
- mkdir "%MODELS_DIR%"
- REM Download inswapper file and place it in the models directory
- echo Downloading inswapper model...
- powershell -Command "Invoke-WebRequest -Uri %INSWAPPER_URL% -OutFile %INSWAPPER_FILE%"
- echo Done!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement