Skip to content

Commit

Permalink
update README for webui requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
Kedreamix committed Jun 12, 2024
1 parent fe4d87f commit 4c8b27d
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 92 deletions.
146 changes: 98 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,78 +162,128 @@ Download the code:
git clone --recursive https://github.com/Kedreamix/Linly-Talker.git
```

To install the environment using Anaconda and PyTorch, follow the steps below:
以下是这段文字的英文翻译:

```bash
conda create -n linly python=3.10
conda activate linly

# PyTorch Installation Method 1: Conda Installation (Recommended)
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch

# PyTorch Installation Method 2: Pip Installation
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113

conda install -q ffmpeg # ffmpeg==4.2.2

pip install -r requirements_app.txt
```
---

If you want to use models like voice cloning, you may need a higher version of PyTorch. However, the functionality will be more diverse. You may need to use CUDA 11.8 as the driver version, which you can choose.
If you are using Linly-Talker, you can set up the environment directly with Anaconda, which covers almost all the dependencies required by the models. The specific steps are as follows:

```bash
conda create -n linly python=3.10
conda activate linly

pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118
# PyTorch installation method 1: Install via conda
# CUDA 11.7
# conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.7 -c pytorch -c nvidia
# CUDA 11.8
# conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia

conda install -q ffmpeg # ffmpeg==4.2.2
# PyTorch installation method 2: Install via pip
# CUDA 11.7
# pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
# CUDA 11.8
pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118

pip install -r requirements_app.txt
conda install ffmpeg==4.2.2 # Install ffmpeg==4.2.2

# Install dependencies for voice cloning
pip install -r VITS/requirements_gptsovits.txt
```
pip install -r requirements_webui.txt

If you wish to use NeRF-based models, you may need to set up the corresponding environment:
# Install dependencies related to musetalk
pip install --no-cache-dir -U openmim
mim install mmengine
mim install "mmcv>=2.0.1"
mim install "mmdet>=3.1.0"
mim install "mmpose>=1.1.0"

```bash
# Install dependencies for NeRF
# Install NeRF-based dependencies, which might have several issues and can be skipped initially
pip install "git+https://github.com/facebookresearch/pytorch3d.git"
pip install -r TFG/requirements_nerf.txt

# If there are issues with PyAudio, you can install the corresponding dependencies
# If there are issues with pyaudio, install the corresponding dependencies
# sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0

# Note the following modules. If installation is unsuccessful, you can navigate to the path and use pip install . or python setup.py install to compile and install.
# Note the following modules. If installation fails, you can enter the directory and use pip install . or python setup.py install to compile and install:
# NeRF/freqencoder
# NeRF/gridencoder
# NeRF/raymarching
# NeRF/shencoder
```

If you are using PaddleTTS, you can set up the corresponding environment with:

```bash
pip install -r TTS/requirements_paddle.txt
```

If you are using the FunASR speech recognition model, you can install the environment with:

```
pip install -r ASR/requirements_funasr.txt
```

If using the MuesTalk model, you can set up the environment with the following commands:
Below are some older installation methods, which might cause dependency conflicts, but they generally don't produce many bugs. For an easier and better installation, I've updated the above version. You can ignore the following versions or refer to them if you encounter issues.

```bash
pip install --no-cache-dir -U openmim
mim install mmengine
mim install "mmcv>=2.0.1"
mim install "mmdet>=3.1.0"
mim install "mmpose>=1.1.0"
pip install -r TFG/requirements_musetalk.txt
```
> To install the environment using Anaconda and PyTorch, follow the steps below:
>
> ```bash
> conda create -n linly python=3.10
> conda activate linly
>
> # PyTorch Installation Method 1: Conda Installation (Recommended)
> conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
>
> # PyTorch Installation Method 2: Pip Installation
> pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
>
> conda install -q ffmpeg # ffmpeg==4.2.2
>
> pip install -r requirements_app.txt
> ```
>
> If you want to use models like voice cloning, you may need a higher version of PyTorch. However, the functionality will be more diverse. You may need to use CUDA 11.8 as the driver version, which you can choose.
>
> ```bash
> conda create -n linly python=3.10
> conda activate linly
>
> pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118
>
> conda install -q ffmpeg # ffmpeg==4.2.2
>
> pip install -r requirements_app.txt
>
> # Install dependencies for voice cloning
> pip install -r VITS/requirements_gptsovits.txt
> ```
>
> If you wish to use NeRF-based models, you may need to set up the corresponding environment:
>
> ```bash
> # Install dependencies for NeRF
> pip install "git+https://github.com/facebookresearch/pytorch3d.git"
> pip install -r TFG/requirements_nerf.txt
>
> # If there are issues with PyAudio, you can install the corresponding dependencies
> # sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
>
> # Note the following modules. If installation is unsuccessful, you can navigate to the path and use pip install . or python setup.py install to compile and install.
> # NeRF/freqencoder
> # NeRF/gridencoder
> # NeRF/raymarching
> # NeRF/shencoder
> ```
>
> If you are using PaddleTTS, you can set up the corresponding environment with:
>
> ```bash
> pip install -r TTS/requirements_paddle.txt
> ```
>
> If you are using the FunASR speech recognition model, you can install the environment with:
>
> ```
> pip install -r ASR/requirements_funasr.txt
> ```
>
> If using the MuesTalk model, you can set up the environment with the following commands:
>
> ```bash
> pip install --no-cache-dir -U openmim
> mim install mmengine
> mim install "mmcv>=2.0.1"
> mim install "mmdet>=3.1.0"
> mim install "mmpose>=1.1.0"
> pip install -r TFG/requirements_musetalk.txt
> ```
>
Next, you need to install the corresponding models. You can download them using the following methods. Once downloaded, place the files in the specified folder structure (explained at the end of this document).
Expand Down
135 changes: 92 additions & 43 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,43 +159,37 @@ Windows我加入了一个python一键整合包,可以按顺序进行运行,
git clone --recursive https://github.com/Kedreamix/Linly-Talker.git
```

首先使用anaconda安装环境,安装pytorch环境,具体操作如下:
若使用Linly-Talker,可以直接用anaconda进行安装环境,几乎包括所有的模型所需要的依赖,具体操作如下:

```bash
conda create -n linly python=3.10
conda activate linly

# pytorch安装方式1:conda安装(推荐)
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
# pytorch安装方式1:conda安装
# CUDA 11.7
# conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.7 -c pytorch -c nvidia
# CUDA 11.8
# conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia

# pytorch安装方式2:pip 安装
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113

conda install -q ffmpeg # ffmpeg==4.2.2

pip install -r requirements_app.txt
```

若使用语音克隆等模型,需要更高版本的Pytorch,但是功能也会更加丰富,不过需要的驱动版本可能要到cuda11.8,可选择

```bash
conda create -n linly python=3.10
conda activate linly

# CUDA 11.7
# pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
# CUDA 11.8
pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118

conda install -q ffmpeg # ffmpeg==4.2.2
conda install ffmpeg==4.2.2 # ffmpeg==4.2.2

pip install -r requirements_app.txt
pip install -r requirements_webui.txt

# 安装语音克隆对应的依赖
pip install -r VITS/requirements_gptsovits.txt
```
# 安装有关musetalk依赖
pip install --no-cache-dir -U openmim
mim install mmengine
mim install "mmcv>=2.0.1"
mim install "mmdet>=3.1.0"
mim install "mmpose>=1.1.0"

若希望使用NeRF-based等模型等话,可能需要安装一下对应的环境

```bash
# 安装NeRF对应的依赖
# 安装NeRF-based依赖,可能问题较多,可以先放弃
pip install "git+https://github.com/facebookresearch/pytorch3d.git"
pip install -r TFG/requirements_nerf.txt

Expand All @@ -209,28 +203,83 @@ pip install -r TFG/requirements_nerf.txt
# NeRF/shencoder
```

若使用PaddleTTS,可安装对应的环境
以下是旧版本的一些安装方法,可能存在会一些依赖冲突的问题,但是也不会出现太多bug,但是为了更好更方便的安装,我就更新了上述版本,以下版本可以忽略,或者遇到问题可以参考一下

```bash
pip install -r TTS/requirements_paddle.txt
```

若使用FunASR语音识别模型,可安装环境

```
pip install -r ASR/requirements_funasr.txt
```
> 首先使用anaconda安装环境,安装pytorch环境,具体操作如下:
>
> ```bash
> conda create -n linly python=3.10
> conda activate linly
>
> # pytorch安装方式1:conda安装(推荐)
> conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
>
> # pytorch安装方式2:pip 安装
> pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
>
> conda install -q ffmpeg # ffmpeg==4.2.2
>
> pip install -r requirements_app.txt
> ```
>
> 若使用语音克隆等模型,需要更高版本的Pytorch,但是功能也会更加丰富,不过需要的驱动版本可能要到cuda11.8,可选择
>
> ```bash
> conda create -n linly python=3.10
> conda activate linly
>
> pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118
>
> conda install -q ffmpeg # ffmpeg==4.2.2
>
> pip install -r requirements_app.txt
>
> # 安装语音克隆对应的依赖
> pip install -r VITS/requirements_gptsovits.txt
> ```
>
> 若希望使用NeRF-based等模型等话,可能需要安装一下对应的环境
>
> ```bash
> # 安装NeRF对应的依赖
> pip install "git+https://github.com/facebookresearch/pytorch3d.git"
> pip install -r TFG/requirements_nerf.txt
>
> # 若pyaudio出现问题,可安装对应依赖
> # sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
>
> # 注意以下几个模块,若安装不成功,可以进入路径利用pip install . 或者 python setup.py install编译安装
> # NeRF/freqencoder
> # NeRF/gridencoder
> # NeRF/raymarching
> # NeRF/shencoder
> ```
>
> 若使用PaddleTTS,可安装对应的环境
>
> ```bash
> pip install -r TTS/requirements_paddle.txt
> ```
>
> 若使用FunASR语音识别模型,可安装环境
>
> ```
> pip install -r ASR/requirements_funasr.txt
> ```
>
> 若使用MuesTalk模型,可安装环境
>
> ```bash
> pip install --no-cache-dir -U openmim
> mim install mmengine
> mim install "mmcv>=2.0.1"
> mim install "mmdet>=3.1.0"
> mim install "mmpose>=1.1.0"
> pip install -r TFG/requirements_musetalk.txt
> ```
>
若使用MuesTalk模型,可安装环境
```bash
pip install --no-cache-dir -U openmim
mim install mmengine
mim install "mmcv>=2.0.1"
mim install "mmdet>=3.1.0"
mim install "mmpose>=1.1.0"
pip install -r TFG/requirements_musetalk.txt
```
接下来还需要安装对应的模型,有以下下载方式,下载后安装文件架结构放置,文件夹结构在本文最后有说明,建议从夸克网盘下载,会第一时间更新
Expand Down
2 changes: 1 addition & 1 deletion requirements_webui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# torchaudio==2.0.2

# conda install ffmpeg==4.2.2
# pip install --no-cache-dir -U
# pip install --no-cache-dir -U openmim
# mim install mmengine
# mim install "mmcv>=2.0.1"
# mim install "mmdet>=3.1.0"
Expand Down

0 comments on commit 4c8b27d

Please sign in to comment.