doc: update readme and changelog

This commit is contained in:
guojianzhu 2024-08-05 18:38:00 +08:00
parent 034021fb20
commit 3ad535e7d1
2 changed files with 15 additions and 7 deletions

View File

@ -20,19 +20,25 @@ We are pleased to announce the release of the animals mode, which is fine-tuned
> Please note that we have not trained the stitching and retargeting modules for the animals model due to several technical issues. _This may be addressed in future updates._ Therefore, we recommend **disabling stitching by setting the `--no_flag_stitching`** option when running the model. Additionally, `paste-back` is also not recommended. > Please note that we have not trained the stitching and retargeting modules for the animals model due to several technical issues. _This may be addressed in future updates._ Therefore, we recommend **disabling stitching by setting the `--no_flag_stitching`** option when running the model. Additionally, `paste-back` is also not recommended.
Before launching, ensure you have installed `transformers==4.22.0`, `pillow>=10.2.0`, which are already updated in [`requirements_base.txt`](../../../requirements_base.txt). We have chosen [X-Pose](https://github.com/IDEA-Research/X-Pose) as the keypoints detector for animals. This relies on `transformers` and requires building an OP named `MultiScaleDeformableAttention` by #### Install X-Pose
We have chosen [X-Pose](https://github.com/IDEA-Research/X-Pose) as the keypoints detector for animals. This relies on `transformers==4.22.0` and `pillow>=10.2.0` (which are already updated in `requirements.txt`) and requires building an OP named `MultiScaleDeformableAttention`.
Refer to the [PyTorch installation](https://github.com/KwaiVGI/LivePortrait?tab=readme-ov-file#for-linux-or-windows-users) for Linux and Windows users.
Next, build the OP `MultiScaleDeformableAttention` by running:
```bash ```bash
cd src/utils/dependencies/XPose/models/UniPose/ops cd src/utils/dependencies/XPose/models/UniPose/ops
python setup.py build install python setup.py build install
cd - # equal to cd ../../../../../../../ cd - # this returns to the previous directory
``` ```
You can run the model using the script `inference_animals.py`: To run the model, use the `inference_animals.py` script:
```bash ```bash
python inference_animals.py -s assets/examples/source/s39.jpg -d assets/examples/driving/wink.pkl --no_flag_stitching --driving_multiplier 1.75 python inference_animals.py -s assets/examples/source/s39.jpg -d assets/examples/driving/wink.pkl --no_flag_stitching --driving_multiplier 1.75
``` ```
Alternatively, we recommend using Gradio. Simply launch it by running: Alternatively, you can use Gradio for a more user-friendly interface. Launch it with:
```bash ```bash
python app_animals.py # --server_port 8889 --server_name "0.0.0.0" --share python app_animals.py # --server_port 8889 --server_name "0.0.0.0" --share
``` ```

View File

@ -71,14 +71,15 @@ conda activate LivePortrait
``` ```
#### For Linux or Windows Users #### For Linux or Windows Users
[X-Pose](https://github.com/IDEA-Research/X-Pose) requires your `torch` version to be compatible with the CUDA version.
The [X-Pose](https://github.com/IDEA-Research/X-Pose) dependency has **strict limitations** on the CUDA version. To check your current CUDA version, run the following command: Firstly, check your current CUDA version by:
```bash ```bash
nvcc -V # example versions: 11.1, 11.8, 12.1, etc. nvcc -V # example versions: 11.1, 11.8, 12.1, etc.
``` ```
We provide installation commands for `torch` corresponding to three common CUDA versions. If your version is not listed, please visit [PyTorch Official Website](https://pytorch.org/get-started/previous-versions/) to find the installation command for your CUDA version.
Then, install the corresponding torch version. Here are examples for different CUDA versions. Visit the [PyTorch Official Website](https://pytorch.org/get-started/previous-versions) for installation commands if your CUDA version is not listed:
```bash ```bash
# for Linux and Windows users (choose one based on your CUDA version):
# for CUDA 11.1 # for CUDA 11.1
pip install torch==1.10.1+cu111 torchvision==0.11.2 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html pip install torch==1.10.1+cu111 torchvision==0.11.2 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html
# for CUDA 11.8 # for CUDA 11.8
@ -87,6 +88,7 @@ pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121 pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121
# ... # ...
``` ```
Finally, install the remaining dependencies: Finally, install the remaining dependencies:
```bash ```bash
pip install -r requirements.txt pip install -r requirements.txt