├── README.md ├── SadTalker_colab.ipynb ├── SadTalker_old_colab.ipynb └── SadTalker_v0.2_colab.ipynb /README.md: -------------------------------------------------------------------------------- 1 | 🐣 Please follow me for new updates https://twitter.com/camenduru
2 | 🔥 Please join our discord server https://discord.gg/k5BwmmvJJU
3 | 🥳 Please join my patreon community https://patreon.com/camenduru
4 | 5 | ## 🦒 Colab 6 | 7 | | Colab | Info 8 | | --- | --- | 9 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/SadTalker-colab/blob/main/SadTalker_v0.2_colab.ipynb) | SadTalker_v0.2_colab 🚦WIP🚦 10 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/SadTalker-colab/blob/main/SadTalker_colab.ipynb) | SadTalker_colab 11 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Winfredy/SadTalker/blob/main/quick_demo.ipynb) | SadTalker_colab (Without Gradio) (Author Colab) 12 | 13 | ## Main Repo 14 | https://github.com/OpenTalker/SadTalker 15 | 16 | ## Paper 17 | https://arxiv.org/abs/2211.12194 18 | 19 | ## Page 20 | https://sadtalker.github.io/ 21 | 22 | ## Output 23 | 24 | ### v0.2 25 | 26 | https://github.com/camenduru/SadTalker-colab/assets/54370274/db50ebf7-a3e3-4fc6-acb2-5cc89f1a26e1 27 | 28 | ### v0.1 29 | 30 | https://github.com/camenduru/SadTalker-colab/assets/54370274/09f9b4a2-29c3-46f0-b4bc-866f25616b05 31 | 32 | https://github.com/camenduru/SadTalker-colab/assets/54370274/e49fdb29-9faf-45aa-8135-9d9ba7d63ca0 33 | -------------------------------------------------------------------------------- /SadTalker_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/SadTalker-colab/blob/main/SadTalker_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "VjYy0F2gZIPR" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "# import os\n", 22 | "# os.environ[\"COQUI_TOS_AGREED\"] = \"1\"\n", 23 | "# !pip install -q TTS==0.17.8\n", 24 | "!git clone -b v1.1 https://github.com/camenduru/SadTalker\n", 25 | "!pip install -q gradio safetensors kornia facexlib yacs gfpgan\n", 26 | "%cd /content/SadTalker\n", 27 | "\n", 28 | "!apt -y install -qq aria2\n", 29 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/checkpoints/SadTalker_V0.0.2_256.safetensors -d /content/SadTalker/checkpoints -o SadTalker_V0.0.2_256.safetensors\n", 30 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/checkpoints/SadTalker_V0.0.2_512.safetensors -d /content/SadTalker/checkpoints -o SadTalker_V0.0.2_512.safetensors\n", 31 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/checkpoints/mapping_00109-model.pth.tar -d /content/SadTalker/checkpoints -o mapping_00109-model.pth.tar\n", 32 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/checkpoints/mapping_00229-model.pth.tar -d /content/SadTalker/checkpoints -o mapping_00229-model.pth.tar\n", 33 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/gfpgan/weights/GFPGANv1.4.pth -d /content/SadTalker/gfpgan/weights -o GFPGANv1.4.pth\n", 34 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/gfpgan/weights/alignment_WFLW_4HG.pth -d /content/SadTalker/gfpgan/weights -o alignment_WFLW_4HG.pth\n", 35 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/gfpgan/weights/detection_Resnet50_Final.pth -d /content/SadTalker/gfpgan/weights -o detection_Resnet50_Final.pth\n", 36 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/gfpgan/weights/parsing_parsenet.pth -d /content/SadTalker/gfpgan/weights -o parsing_parsenet.pth\n", 37 | "\n", 38 | "!python app_sadtalker.py" 39 | ] 40 | } 41 | ], 42 | "metadata": { 43 | "accelerator": "GPU", 44 | "colab": { 45 | "gpuType": "T4", 46 | "provenance": [] 47 | }, 48 | "kernelspec": { 49 | "display_name": "Python 3", 50 | "name": "python3" 51 | }, 52 | "language_info": { 53 | "name": "python" 54 | } 55 | }, 56 | "nbformat": 4, 57 | "nbformat_minor": 0 58 | } 59 | -------------------------------------------------------------------------------- /SadTalker_old_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/SadTalker-colab/blob/main/SadTalker_old_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "VjYy0F2gZIPR" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "!git clone -b dev https://github.com/camenduru/SadTalker-hf\n", 22 | "!pip install -q face_alignment resampy pydub kornia yacs basicsr facexlib gradio gfpgan safetensors\n", 23 | "%cd /content/SadTalker-hf\n", 24 | "\n", 25 | "!apt -y install -qq aria2\n", 26 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/auido2exp_00300-model.pth -d /content/SadTalker-hf/checkpoints -o auido2exp_00300-model.pth\n", 27 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/auido2pose_00140-model.pth -d /content/SadTalker-hf/checkpoints -o auido2pose_00140-model.pth\n", 28 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/epoch_20.pth -d /content/SadTalker-hf/checkpoints -o epoch_20.pth\n", 29 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/facevid2vid_00189-model.pth.tar -d /content/SadTalker-hf/checkpoints -o facevid2vid_00189-model.pth.tar\n", 30 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/mapping_00229-model.pth.tar -d /content/SadTalker-hf/checkpoints -o mapping_00229-model.pth.tar\n", 31 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/shape_predictor_68_face_landmarks.dat -d /content/SadTalker-hf/checkpoints -o shape_predictor_68_face_landmarks.dat\n", 32 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/wav2lip.pth -d /content/SadTalker-hf/checkpoints -o wav2lip.pth\n", 33 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/hub/checkpoints/2DFAN4-cd938726ad.zip -d /content/SadTalker-hf/checkpoints/hub/checkpoints -o 2DFAN4-cd938726ad.zip\n", 34 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/hub/checkpoints/s3fd-619a316812.pth -d /content/SadTalker-hf/checkpoints/hub/checkpoints -o s3fd-619a316812.pth\n", 35 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/BFM_Fitting/01_MorphableModel.mat -d /content/SadTalker-hf/checkpoints/BFM_Fitting -o 01_MorphableModel.mat\n", 36 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/BFM_Fitting/BFM09_model_info.mat -d /content/SadTalker-hf/checkpoints/BFM_Fitting -o BFM09_model_info.mat\n", 37 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/BFM_Fitting/BFM_exp_idx.mat -d /content/SadTalker-hf/checkpoints/BFM_Fitting -o BFM_exp_idx.mat\n", 38 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/BFM_Fitting/BFM_front_idx.mat -d /content/SadTalker-hf/checkpoints/BFM_Fitting -o BFM_front_idx.mat\n", 39 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/BFM_Fitting/Exp_Pca.bin -d /content/SadTalker-hf/checkpoints/BFM_Fitting -o Exp_Pca.bin\n", 40 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/BFM_Fitting/facemodel_info.mat -d /content/SadTalker-hf/checkpoints/BFM_Fitting -o facemodel_info.mat\n", 41 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/BFM_Fitting/select_vertex_id.mat -d /content/SadTalker-hf/checkpoints/BFM_Fitting -o select_vertex_id.mat\n", 42 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/BFM_Fitting/similarity_Lm3D_all.mat -d /content/SadTalker-hf/checkpoints/BFM_Fitting -o similarity_Lm3D_all.mat\n", 43 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/raw/main/BFM_Fitting/std_exp.txt -d /content/SadTalker-hf/checkpoints/BFM_Fitting -o std_exp.txt\n", 44 | "\n", 45 | "!python app.py" 46 | ] 47 | } 48 | ], 49 | "metadata": { 50 | "accelerator": "GPU", 51 | "colab": { 52 | "gpuType": "T4", 53 | "provenance": [] 54 | }, 55 | "kernelspec": { 56 | "display_name": "Python 3", 57 | "name": "python3" 58 | }, 59 | "language_info": { 60 | "name": "python" 61 | } 62 | }, 63 | "nbformat": 4, 64 | "nbformat_minor": 0 65 | } 66 | -------------------------------------------------------------------------------- /SadTalker_v0.2_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/SadTalker-colab/blob/main/SadTalker_v0.2_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "VjYy0F2gZIPR" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "# import os\n", 22 | "# os.environ[\"COQUI_TOS_AGREED\"] = \"1\"\n", 23 | "# !pip install -q TTS==0.17.8\n", 24 | "!git clone -b v2.0 https://github.com/camenduru/SadTalker\n", 25 | "!pip install -q gradio safetensors kornia facexlib yacs gfpgan\n", 26 | "%cd /content/SadTalker\n", 27 | "\n", 28 | "!apt -y install -qq aria2\n", 29 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/checkpoints/SadTalker_V0.0.2_256.safetensors -d /content/SadTalker/checkpoints -o SadTalker_V0.0.2_256.safetensors\n", 30 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/checkpoints/SadTalker_V0.0.2_512.safetensors -d /content/SadTalker/checkpoints -o SadTalker_V0.0.2_512.safetensors\n", 31 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/checkpoints/mapping_00109-model.pth.tar -d /content/SadTalker/checkpoints -o mapping_00109-model.pth.tar\n", 32 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/checkpoints/mapping_00229-model.pth.tar -d /content/SadTalker/checkpoints -o mapping_00229-model.pth.tar\n", 33 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/gfpgan/weights/GFPGANv1.4.pth -d /content/SadTalker/gfpgan/weights -o GFPGANv1.4.pth\n", 34 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/gfpgan/weights/alignment_WFLW_4HG.pth -d /content/SadTalker/gfpgan/weights -o alignment_WFLW_4HG.pth\n", 35 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/gfpgan/weights/detection_Resnet50_Final.pth -d /content/SadTalker/gfpgan/weights -o detection_Resnet50_Final.pth\n", 36 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/gfpgan/weights/parsing_parsenet.pth -d /content/SadTalker/gfpgan/weights -o parsing_parsenet.pth\n", 37 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/SadTalker/resolve/main/new/checkpoints/epoch_00190_iteration_000400000_checkpoint.pt -d /content/SadTalker/checkpoints -o epoch_00190_iteration_000400000_checkpoint.pt\n", 38 | "\n", 39 | "!python app_sadtalker.py" 40 | ] 41 | } 42 | ], 43 | "metadata": { 44 | "accelerator": "GPU", 45 | "colab": { 46 | "gpuType": "T4", 47 | "provenance": [] 48 | }, 49 | "kernelspec": { 50 | "display_name": "Python 3", 51 | "name": "python3" 52 | }, 53 | "language_info": { 54 | "name": "python" 55 | } 56 | }, 57 | "nbformat": 4, 58 | "nbformat_minor": 0 59 | } 60 | --------------------------------------------------------------------------------