mirror of
https://github.com/KwaiVGI/LivePortrait.git
synced 2024-12-22 12:22:38 +00:00
doc: update readme and changelog
This commit is contained in:
parent
034021fb20
commit
3ad535e7d1
@ -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.
|
||||
|
||||
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
|
||||
cd src/utils/dependencies/XPose/models/UniPose/ops
|
||||
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
|
||||
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
|
||||
python app_animals.py # --server_port 8889 --server_name "0.0.0.0" --share
|
||||
```
|
||||
|
@ -71,14 +71,15 @@ conda activate LivePortrait
|
||||
```
|
||||
|
||||
#### 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
|
||||
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
|
||||
# for Linux and Windows users (choose one based on your CUDA version):
|
||||
# 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
|
||||
# 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
|
||||
# ...
|
||||
```
|
||||
|
||||
Finally, install the remaining dependencies:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
|
Loading…
Reference in New Issue
Block a user