> For the complete documentation index, see [llms.txt](https://metaverse-imagen.gitbook.io/ai-tools-research/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://metaverse-imagen.gitbook.io/ai-tools-research/solutions-and-tutorials/tools-selection/roop-deep-fake-video/roop-installation.md).

# ROOP Installation

## Installation

> For Windows, you need to download and install [Visual Studio](https://visualstudio.microsoft.com/de/downloads/) (in theory build-tools might work too but in my experience so far they don't). During the install, make sure to include the C++ package.&#x20;
>
> Also the default installation is set to CUDA Acceleration, for this you need the special CUDA Drivers installed from NVIDIA found here: <https://developer.nvidia.com/cuda-11-8-0-download-archive> <https://developer.nvidia.com/rdp/cudnn-archive>

#### Manual Installation

* `git clone https://github.com/C0untFloyd/roop-unleashed`
* preferably create a venv or conda environment
* `cd roop-unleashed`
* `pip install -r requirements.txt`

For Video face-swapping you also need to have ffmpeg properly installed (having it in your PATH Env).

#### Windows 1-click installer

Just click on the 'windows\_run.bat'. The windows installer tries to do everything for you, installing Git, Miniconda with Python and ffmpeg first. After that it automatically tries to do everything from the manual installation above.

Sometimes the installer seems to mess up existing Python installations, so treat it with caution and if you're an experienced user with lots of Python apps running you might be better off installing this by manually.

**💡 The windows installer also runs roop-unleashed by clicking on the same .bat file. Once there is a new app version, just answer the 'Update' question at the beginning with 'y' and your installation will be updated to the latest version.**

The default installation on windows is for CUDA enabled GPUs (NVIDIA) all other OS are plain CPU.

For better Hardware-Acceleration and depending on your available GPU and Hardware there are additional packages you might want to install.

**CUDA (Nvidia)** Install CUDA Toolkit 11.8 and cuDNN for Cuda 11.x <https://developer.nvidia.com/cuda-11-8-0-download-archive> <https://developer.nvidia.com/rdp/cudnn-archive>

`pip uninstall onnxruntime onnxruntime-gpu` `pip install onnxruntime-gpu==1.15.1`

**CoreML Apple Silicon**

`pip uninstall onnxruntime` `pip install onnxruntime-silicon`

Pip package and custom wheels from:

<https://github.com/cansik/onnxruntime-silicon/>

**Apple Mac Intel**

Acceleration possible using onnxruntime with CoreML and a package built on an intel mac, i.e. universal binaries built from silicon don't work.

`pip uninstall onnxruntime` `pip install "path to downloadeded wheel"`

You can use the custom wheel from here:\
<https://github.com/Oil3/onnxruntime-mac>

**DirectML (AMD GPU + Windows)**

`pip uninstall onnxruntime onnxruntime-directml` `pip install onnxruntime-directml==1.15.1`

**OpenVINO (Intel)**

`pip uninstall onnxruntime onnxruntime-openvino` `pip install onnxruntime-openvino==1.15.0`

The used GPU Provider is configured in the settings tab, no need to use cmdline arguments any more. Default is CUDA (for NVIDIA). If you change it, please restart roop-unleashed completely to allow for model reloading.

#### Running

Windows Installer: click on **'windows\_run.bat'**

Everybody else: **`python run.py`**

> Note: When you run this program for the first time, it will download some models roughly \~2Gb in size.
