# Installation

### 1. Prepare Your Platform

{% content-ref url="/pages/ptDjEJiQYmfMKwnxmnC4" %}
[Linux](/installation/platform/linux.md)
{% endcontent-ref %}

{% content-ref url="/pages/f5VPIJhtmtQI6rHI2jW6" %}
[macOS](/installation/platform/macos.md)
{% endcontent-ref %}

{% content-ref url="/pages/mM490Q5CntMz0QwbTjBC" %}
[Windows](/installation/platform/windows.md)
{% endcontent-ref %}

### 2. Prepare Your Environment

Initialize conda for your terminal:

```
conda init --all
```

Create the environment:

```
conda create --name facefusion python=3.12 pip=25.0
```

Activate the environment:

```
conda activate facefusion
```

### 3. Install Your Accelerator

{% content-ref url="/pages/WSUlX58OkGceZcsC8ImV" %}
[Linux](/installation/accelerator/linux.md)
{% endcontent-ref %}

{% content-ref url="/pages/0nysjox1RHxmvx1S1abS" %}
[Windows](/installation/accelerator/windows.md)
{% endcontent-ref %}

### 4. Download Your Copy

Clone the repository:

{% tabs fullWidth="false" %}
{% tab title="GitHub" %}

```
git clone https://github.com/facefusion/facefusion
```

{% endtab %}

{% tab title="Gitee" %}

```
git clone https://gitee.com/facefusion/facefusion
```

{% endtab %}
{% endtabs %}

Ensure to enter the directory:

```
cd facefusion
```

### 5. Install The Application

{% tabs fullWidth="false" %}
{% tab title="CPU" %}

```
python install.py --onnxruntime default
```

{% endtab %}

{% tab title="CUDA" %}

```
python install.py --onnxruntime cuda
```

{% endtab %}

{% tab title="CoreML" %}

```
python install.py --onnxruntime default
```

{% endtab %}

{% tab title="DirectML" %}

```
python install.py --onnxruntime directml
```

{% endtab %}

{% tab title="MIGraphX" %}

```
python install.py --onnxruntime migraphx
```

{% endtab %}

{% tab title="OpenVINO" %}

```
python install.py --onnxruntime openvino
```

{% endtab %}
{% endtabs %}

### 6. Reload Your Environment

```
conda deactivate
```

```
conda activate facefusion
```

### 7. Done

Finally, run the program:

```
python facefusion.py run --open-browser
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.facefusion.io/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
