├── README.md
├── time-machine.zip
├── Videoretalking1262024.zip
├── LICENSE
├── OmniControl.ipynb
├── time-machine.ipynb
├── MagicQuill.ipynb
├── MagicQuill_.ipynb
├── sad_talker_video_colab.ipynb
├── mmaudio.ipynb
├── EchoMimicV2 .ipynb
├── memo.ipynb
├── liveportriattalker.ipynb
├── Omnigen.ipynb
├── RMBG_2_Studio.ipynb
└── Remove_Video_Background.ipynb
/README.md:
--------------------------------------------------------------------------------
1 | # Google
2 | Google Collab Notebooks
3 |
--------------------------------------------------------------------------------
/time-machine.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zachysaur/Google/HEAD/time-machine.zip
--------------------------------------------------------------------------------
/Videoretalking1262024.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zachysaur/Google/HEAD/Videoretalking1262024.zip
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 zachysaur
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/OmniControl.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "machine_shape": "hm",
8 | "gpuType": "A100"
9 | },
10 | "kernelspec": {
11 | "name": "python3",
12 | "display_name": "Python 3"
13 | },
14 | "language_info": {
15 | "name": "python"
16 | },
17 | "accelerator": "GPU"
18 | },
19 | "cells": [
20 | {
21 | "cell_type": "markdown",
22 | "source": [
23 | "# Installation"
24 | ],
25 | "metadata": {
26 | "id": "vWW33opXQ3x-"
27 | }
28 | },
29 | {
30 | "cell_type": "code",
31 | "execution_count": null,
32 | "metadata": {
33 | "id": "8DiEuiA1G4Ge"
34 | },
35 | "outputs": [],
36 | "source": [
37 | "%cd /content\n",
38 | "!git clone https://github.com/Yuanshi9815/OminiControl.git\n",
39 | "%cd OminiControl\n",
40 | "!pip install -r requirements.txt"
41 | ]
42 | },
43 | {
44 | "cell_type": "markdown",
45 | "source": [
46 | "## Run with Gradio"
47 | ],
48 | "metadata": {
49 | "id": "0JAjwOsDQyzP"
50 | }
51 | },
52 | {
53 | "cell_type": "markdown",
54 | "source": [],
55 | "metadata": {
56 | "id": "FHITATAjQ-M-"
57 | }
58 | },
59 | {
60 | "cell_type": "code",
61 | "source": [
62 | "!python -m src.gradio.gradio_app"
63 | ],
64 | "metadata": {
65 | "id": "fhbltxoCHw61"
66 | },
67 | "execution_count": null,
68 | "outputs": []
69 | }
70 | ]
71 | }
--------------------------------------------------------------------------------
/time-machine.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "gpuType": "T4"
8 | },
9 | "kernelspec": {
10 | "name": "python3",
11 | "display_name": "Python 3"
12 | },
13 | "language_info": {
14 | "name": "python"
15 | },
16 | "accelerator": "GPU"
17 | },
18 | "cells": [
19 | {
20 | "cell_type": "code",
21 | "execution_count": null,
22 | "metadata": {
23 | "id": "N8NBDhhKrlXk"
24 | },
25 | "outputs": [],
26 | "source": [
27 | "%cd /content\n",
28 | "!git lfs install\n",
29 | "!git clone https://huggingface.co/spaces/ginipick/time-machine\n",
30 | "%cd time-machine\n",
31 | "!pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n",
32 | "!pip install spaces\n",
33 | "!pip install gradio\n",
34 | "!pip install -r requirements.txt"
35 | ]
36 | },
37 | {
38 | "cell_type": "code",
39 | "source": [
40 | "!python app.py"
41 | ],
42 | "metadata": {
43 | "id": "XgGv7R_fi_kr"
44 | },
45 | "execution_count": null,
46 | "outputs": []
47 | },
48 | {
49 | "cell_type": "code",
50 | "source": [
51 | "\n",
52 | "\n",
53 | "# --- Variables ---\n",
54 | "\n",
55 | "Ngrok_token = \"2n1UDtsDils62aCEBd1rf5EGn4B_5WHbhnbqox6dEL2EVdeaz\" # Update with your ngrok token\n",
56 | "Ngrok_domain = \"\" # optional, leave empty if you don't have a domain\n",
57 | "port = 7860\n",
58 | "HOME_FOLDER = \"/content/time-machine\"\n",
59 | "\n",
60 | "# -----------------\n",
61 | "\n",
62 | "!pip install pyngrok==6.1.0 # Downgrade to a version that supports ngrok tunneling\n",
63 | "\n",
64 | "from pyngrok import ngrok, conf\n",
65 | "import gc\n",
66 | "\n",
67 | "gc.collect()\n",
68 | "\n",
69 | "if Ngrok_token:\n",
70 | " try:\n",
71 | " ngrok.set_auth_token(Ngrok_token)\n",
72 | " ngrok.kill()\n",
73 | " srv = ngrok.connect(port)\n",
74 | " print(f\"Ngrok Tunnel is active at: {srv.public_url}\")\n",
75 | "\n",
76 | " # Command to start\n",
77 | " !echo -e \"A\\nN\" | python app.py\n",
78 | "\n",
79 | " except Exception as e:\n",
80 | " print(f\"Error starting ngrok tunnel: {e}\")\n",
81 | "else:\n",
82 | " print('An ngrok token is required. You can get one on https://ngrok.com and paste it into the Ngrok_token field.')\n"
83 | ],
84 | "metadata": {
85 | "id": "JpKWQ9lNiwjT"
86 | },
87 | "execution_count": null,
88 | "outputs": []
89 | }
90 | ]
91 | }
--------------------------------------------------------------------------------
/MagicQuill.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "gpuType": "T4"
8 | },
9 | "kernelspec": {
10 | "name": "python3",
11 | "display_name": "Python 3"
12 | },
13 | "language_info": {
14 | "name": "python"
15 | },
16 | "accelerator": "GPU"
17 | },
18 | "cells": [
19 | {
20 | "cell_type": "markdown",
21 | "source": [
22 | "\n",
23 | "\n",
24 | "Follow my Instagram : https://www.instagram.com/xsocialandapps\n",
25 | "\n"
26 | ],
27 | "metadata": {
28 | "id": "SdT3WeYyfkak"
29 | }
30 | },
31 | {
32 | "cell_type": "markdown",
33 | "source": [
34 | "\n",
35 | "\n",
36 | "# Instalation\n"
37 | ],
38 | "metadata": {
39 | "id": "J6Z5_ME2fN1U"
40 | }
41 | },
42 | {
43 | "cell_type": "code",
44 | "execution_count": null,
45 | "metadata": {
46 | "id": "4LTyZB7FyDhF"
47 | },
48 | "outputs": [],
49 | "source": [
50 | "%cd /content\n",
51 | "!git clone --recursive https://github.com/magic-quill/MagicQuill.git\n",
52 | "%cd /content/MagicQuill\n",
53 | "!pip install -r requirements.txt\n",
54 | "!pip install gradio_magicquill-0.0.1-py3-none-any.whl\n",
55 | "!cp -f pyproject.toml MagicQuill/LLaVA/\n",
56 | "!pip install -e MagicQuill/LLaVA/"
57 | ]
58 | },
59 | {
60 | "cell_type": "markdown",
61 | "source": [
62 | "# Download Models"
63 | ],
64 | "metadata": {
65 | "id": "hCFObw4ofRfj"
66 | }
67 | },
68 | {
69 | "cell_type": "code",
70 | "source": [
71 | "# Download the models.zip file (25GB approx.)\n",
72 | "!wget -O models.zip \"https://hkustconnect-my.sharepoint.com/:u:/g/personal/zliucz_connect_ust_hk/EWlGF0WfawJIrJ1Hn85_-3gB0MtwImAnYeWXuleVQcukMg?e=Gcjugg&download=1\"\n",
73 | "\n",
74 | "# Extract the contents into the current directory\n",
75 | "!unzip -o models.zip -d /content/MagicQuill"
76 | ],
77 | "metadata": {
78 | "id": "_wLSuzCnzbrW"
79 | },
80 | "execution_count": null,
81 | "outputs": []
82 | },
83 | {
84 | "cell_type": "markdown",
85 | "source": [
86 | "# Run with Gradio"
87 | ],
88 | "metadata": {
89 | "id": "5KMiquaJfUzj"
90 | }
91 | },
92 | {
93 | "cell_type": "markdown",
94 | "source": [
95 | "demo.launch(server_name=\"0.0.0.0\", server_port=7861, share=True)"
96 | ],
97 | "metadata": {
98 | "id": "n3_sXCwXfZVz"
99 | }
100 | },
101 | {
102 | "cell_type": "code",
103 | "source": [
104 | "!CUDA_VISIBLE_DEVICES=0 python gradio_run.py"
105 | ],
106 | "metadata": {
107 | "id": "wIF7bKLp3tin"
108 | },
109 | "execution_count": null,
110 | "outputs": []
111 | }
112 | ]
113 | }
--------------------------------------------------------------------------------
/MagicQuill_.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "gpuType": "A100",
8 | "machine_shape": "hm"
9 | },
10 | "kernelspec": {
11 | "name": "python3",
12 | "display_name": "Python 3"
13 | },
14 | "language_info": {
15 | "name": "python"
16 | },
17 | "accelerator": "GPU"
18 | },
19 | "cells": [
20 | {
21 | "cell_type": "markdown",
22 | "source": [
23 | "\n",
24 | "\n",
25 | "Follow my Instagram : https://www.instagram.com/xsocialandapps\n",
26 | "\n"
27 | ],
28 | "metadata": {
29 | "id": "SdT3WeYyfkak"
30 | }
31 | },
32 | {
33 | "cell_type": "markdown",
34 | "source": [
35 | "\n",
36 | "\n",
37 | "# Instalation\n"
38 | ],
39 | "metadata": {
40 | "id": "J6Z5_ME2fN1U"
41 | }
42 | },
43 | {
44 | "cell_type": "code",
45 | "execution_count": null,
46 | "metadata": {
47 | "id": "4LTyZB7FyDhF"
48 | },
49 | "outputs": [],
50 | "source": [
51 | "%cd /content\n",
52 | "!git clone --recursive https://github.com/magic-quill/MagicQuill.git\n",
53 | "%cd /content/MagicQuill\n",
54 | "!pip install -r requirements.txt\n",
55 | "!pip install gradio_magicquill-0.0.1-py3-none-any.whl\n",
56 | "!cp -f pyproject.toml MagicQuill/LLaVA/\n",
57 | "!pip install -e MagicQuill/LLaVA/"
58 | ]
59 | },
60 | {
61 | "cell_type": "markdown",
62 | "source": [
63 | "# Download Models"
64 | ],
65 | "metadata": {
66 | "id": "hCFObw4ofRfj"
67 | }
68 | },
69 | {
70 | "cell_type": "code",
71 | "source": [
72 | "# Download the models.zip file (25GB approx.)\n",
73 | "!wget -O models.zip \"https://hkustconnect-my.sharepoint.com/:u:/g/personal/zliucz_connect_ust_hk/EWlGF0WfawJIrJ1Hn85_-3gB0MtwImAnYeWXuleVQcukMg?e=Gcjugg&download=1\"\n",
74 | "\n",
75 | "# Extract the contents into the current directory\n",
76 | "!unzip -o models.zip -d /content/MagicQuill"
77 | ],
78 | "metadata": {
79 | "id": "_wLSuzCnzbrW"
80 | },
81 | "execution_count": null,
82 | "outputs": []
83 | },
84 | {
85 | "cell_type": "code",
86 | "source": [
87 | "\n",
88 | "# --- Variables ---\n",
89 | "\n",
90 | "Ngrok_token = \"\" # Update with your ngrok token\n",
91 | "Ngrok_domain = \"\" # optional, leave empty if you don't have a domain\n",
92 | "port = 7860\n",
93 | "HOME_FOLDER = \"/content/MagicQuill\"\n",
94 | "\n",
95 | "# -----------------\n",
96 | "\n",
97 | "!pip install pyngrok==6.1.0 # Downgrade to a version that supports ngrok tunneling\n",
98 | "\n",
99 | "from pyngrok import ngrok, conf\n",
100 | "import gc\n",
101 | "\n",
102 | "gc.collect()\n",
103 | "\n",
104 | "if Ngrok_token:\n",
105 | " try:\n",
106 | " ngrok.set_auth_token(Ngrok_token)\n",
107 | " ngrok.kill()\n",
108 | " srv = ngrok.connect(port)\n",
109 | " print(f\"Ngrok Tunnel is active at: {srv.public_url}\")\n",
110 | "\n",
111 | " # Command to start\n",
112 | " !echo -e \"A\\nN\" | python /content/MagicQuill/gradio_run.py\n",
113 | "\n",
114 | " except Exception as e:\n",
115 | " print(f\"Error starting ngrok tunnel: {e}\")\n",
116 | "else:\n",
117 | " print('An ngrok token is required. You can get one on https://ngrok.com and paste it into the Ngrok_token field.')\n"
118 | ],
119 | "metadata": {
120 | "id": "YHWqvHuG_sT-"
121 | },
122 | "execution_count": null,
123 | "outputs": []
124 | }
125 | ]
126 | }
--------------------------------------------------------------------------------
/sad_talker_video_colab.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "source": [
6 | "# Follow my Instagram - https://www.instagram.com/xsocialandapps/"
7 | ],
8 | "metadata": {
9 | "id": "YLpYoJIsZU-l"
10 | }
11 | },
12 | {
13 | "cell_type": "markdown",
14 | "metadata": {
15 | "id": "3fRNVd8lCPel"
16 | },
17 | "source": [
18 | "# Setup Dependecies and checkout project"
19 | ]
20 | },
21 | {
22 | "cell_type": "code",
23 | "execution_count": null,
24 | "metadata": {
25 | "id": "kiXa-uQ2_uLo"
26 | },
27 | "outputs": [],
28 | "source": [
29 | "!python --version\n",
30 | "!apt-get update\n",
31 | "!apt install ffmpeg &> /dev/null\n",
32 | "\n",
33 | "%cd /content\n",
34 | "!git clone https://github.com/zachysaur/SadTalker-Video.git\n",
35 | "%cd SadTalker-Video"
36 | ]
37 | },
38 | {
39 | "cell_type": "markdown",
40 | "metadata": {
41 | "id": "4nleW3KTCPep"
42 | },
43 | "source": [
44 | "# Download required packages & checkpoints"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": null,
50 | "metadata": {
51 | "id": "SjgsGu4kANqe"
52 | },
53 | "outputs": [],
54 | "source": [
55 | "!pip install -r requirements.txt"
56 | ]
57 | },
58 | {
59 | "cell_type": "code",
60 | "execution_count": null,
61 | "metadata": {
62 | "id": "cANkCoKkAXQb"
63 | },
64 | "outputs": [],
65 | "source": [
66 | "!gdown https://drive.google.com/u/0/uc?id=1lW4mf5YNtS4MAD7ZkAauDDWp2N3_Qzs7&export=download"
67 | ]
68 | },
69 | {
70 | "cell_type": "code",
71 | "execution_count": null,
72 | "metadata": {
73 | "id": "bkcbn4L9lzt2"
74 | },
75 | "outputs": [],
76 | "source": [
77 | "!tar -xf /content/SadTalker-Video/checkpoints.tar.gz\n"
78 | ]
79 | },
80 | {
81 | "cell_type": "code",
82 | "source": [
83 | "import fileinput\n",
84 | "\n",
85 | "file_path = \"/usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py\"\n",
86 | "\n",
87 | "for line in fileinput.input(file_path, inplace=True):\n",
88 | " print(line.replace(\n",
89 | " \"from torchvision.transforms.functional_tensor import rgb_to_grayscale\",\n",
90 | " \"from torchvision.transforms.functional import rgb_to_grayscale\"\n",
91 | " ), end=\"\")"
92 | ],
93 | "metadata": {
94 | "id": "ffglhRmMZPGk"
95 | },
96 | "execution_count": null,
97 | "outputs": []
98 | },
99 | {
100 | "cell_type": "markdown",
101 | "metadata": {
102 | "id": "VVNmd_9sCPeq"
103 | },
104 | "source": [
105 | "# Inference the model"
106 | ]
107 | },
108 | {
109 | "cell_type": "code",
110 | "execution_count": null,
111 | "metadata": {
112 | "id": "NgH_C9zmmFoJ"
113 | },
114 | "outputs": [],
115 | "source": [
116 | "!python inference.py --driven_audio \"/content/2.wav\" \\\n",
117 | " --source_video \"/content/0.mp4\" \\\n",
118 | " --enhancer \"none\""
119 | ]
120 | }
121 | ],
122 | "metadata": {
123 | "accelerator": "GPU",
124 | "colab": {
125 | "gpuType": "T4",
126 | "provenance": []
127 | },
128 | "kernelspec": {
129 | "display_name": "Python 3",
130 | "name": "python3"
131 | },
132 | "language_info": {
133 | "codemirror_mode": {
134 | "name": "ipython",
135 | "version": 3
136 | },
137 | "file_extension": ".py",
138 | "mimetype": "text/x-python",
139 | "name": "python",
140 | "nbconvert_exporter": "python",
141 | "pygments_lexer": "ipython3",
142 | "version": "3.10.12"
143 | }
144 | },
145 | "nbformat": 4,
146 | "nbformat_minor": 0
147 | }
--------------------------------------------------------------------------------
/mmaudio.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "gpuType": "T4"
8 | },
9 | "kernelspec": {
10 | "name": "python3",
11 | "display_name": "Python 3"
12 | },
13 | "language_info": {
14 | "name": "python"
15 | },
16 | "accelerator": "GPU"
17 | },
18 | "cells": [
19 | {
20 | "cell_type": "markdown",
21 | "source": [
22 | "Follow my instagram : https://www.instagram.com/xsocialandapps"
23 | ],
24 | "metadata": {
25 | "id": "8UCd9oLtSkK9"
26 | }
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "source": [
31 | "## Install dependencies"
32 | ],
33 | "metadata": {
34 | "id": "nq1Ytxi_gJnh"
35 | }
36 | },
37 | {
38 | "cell_type": "code",
39 | "source": [
40 | "%cd /content\n",
41 | "!git clone https://github.com/zachysaur/MMAudio.git\n",
42 | "%cd /content/MMAudio\n",
43 | "!pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n",
44 | "!pip install -e ."
45 | ],
46 | "metadata": {
47 | "id": "tTiNYTWSgJKB"
48 | },
49 | "execution_count": null,
50 | "outputs": []
51 | },
52 | {
53 | "cell_type": "markdown",
54 | "source": [
55 | "# Upload Video"
56 | ],
57 | "metadata": {
58 | "id": "NmJDTxMGhQdi"
59 | }
60 | },
61 | {
62 | "cell_type": "code",
63 | "source": [
64 | "from IPython.display import HTML\n",
65 | "from base64 import b64encode\n",
66 | "import ipywidgets as widgets\n",
67 | "from IPython.display import display\n",
68 | "\n",
69 | "# Create a file upload widget\n",
70 | "upload_widget = widgets.FileUpload(accept=\".mp4\", multiple=False)\n",
71 | "\n",
72 | "# Function to display the uploaded video\n",
73 | "def display_video(change):\n",
74 | " for file_name, file_info in upload_widget.value.items():\n",
75 | " # Save the uploaded file\n",
76 | " with open(file_name, 'wb') as f:\n",
77 | " f.write(file_info['content'])\n",
78 | "\n",
79 | " # Convert the video to a base64 data URL\n",
80 | " data_url = \"data:video/mp4;base64,\" + b64encode(open(file_name, 'rb').read()).decode()\n",
81 | " display(HTML(f\"\"\"\n",
82 | " \n",
85 | " \"\"\"))\n",
86 | "\n",
87 | "# Observe changes to the upload widget\n",
88 | "upload_widget.observe(display_video, names='value')\n",
89 | "\n",
90 | "# Display the widget\n",
91 | "display(upload_widget)"
92 | ],
93 | "metadata": {
94 | "id": "3SYoUcUghlal"
95 | },
96 | "execution_count": null,
97 | "outputs": []
98 | },
99 | {
100 | "cell_type": "markdown",
101 | "source": [
102 | "\n",
103 | "# Prompt and Result"
104 | ],
105 | "metadata": {
106 | "id": "v_BM2f7niHm1"
107 | }
108 | },
109 | {
110 | "cell_type": "code",
111 | "source": [
112 | "!python demo.py --duration=10 --video=322875732015239177.mp4 --prompt \"Parrott singing ana song\"\n",
113 | "\n",
114 | "\n",
115 | "from IPython.display import HTML\n",
116 | "from base64 import b64encode\n",
117 | "data_url = \"data:video/mp4;base64,\" + b64encode(open('./output/322875732015239177.mp4', 'rb').read()).decode()\n",
118 | "HTML(\"\"\"\n",
119 | "\n",
122 | "\"\"\" % data_url)"
123 | ],
124 | "metadata": {
125 | "id": "xnhmnCkJiiAU"
126 | },
127 | "execution_count": null,
128 | "outputs": []
129 | }
130 | ]
131 | }
--------------------------------------------------------------------------------
/EchoMimicV2 .ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "machine_shape": "hm",
8 | "gpuType": "A100"
9 | },
10 | "kernelspec": {
11 | "name": "python3",
12 | "display_name": "Python 3"
13 | },
14 | "language_info": {
15 | "name": "python"
16 | },
17 | "accelerator": "GPU"
18 | },
19 | "cells": [
20 | {
21 | "cell_type": "markdown",
22 | "source": [
23 | "# Installation\n"
24 | ],
25 | "metadata": {
26 | "id": "uieT4e3Tpoa0"
27 | }
28 | },
29 | {
30 | "cell_type": "code",
31 | "execution_count": null,
32 | "metadata": {
33 | "id": "DgV1-gDuq4HC"
34 | },
35 | "outputs": [],
36 | "source": [
37 | "# EchoMimicV2 Installation and Inference Notebook\n",
38 | "\n",
39 | "# 1. Clone the Repository\n",
40 | "!git clone https://github.com/antgroup/echomimic_v2\n",
41 | "%cd echomimic_v2\n",
42 | "\n",
43 | "# 2. Install System Dependencies\n",
44 | "# Update and install ffmpeg-static for video/audio processing\n",
45 | "!apt-get update && apt-get install -y ffmpeg\n",
46 | "\n",
47 | "# 3. Install Python Environment and Dependencies\n",
48 | "# Install necessary Python packages\n",
49 | "!pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 \\\n",
50 | " xformers==0.0.28.post3 --index-url https://download.pytorch.org/whl/cu124\n",
51 | "!pip install torchao --index-url https://download.pytorch.org/whl/nightly/cu124\n",
52 | "!pip install -r requirements.txt\n",
53 | "!pip install --no-deps facenet_pytorch==2.6.0\n"
54 | ]
55 | },
56 | {
57 | "cell_type": "markdown",
58 | "source": [
59 | "# Download Pretrained Weights"
60 | ],
61 | "metadata": {
62 | "id": "m526eDh6pl8c"
63 | }
64 | },
65 | {
66 | "cell_type": "code",
67 | "source": [
68 | "# 4. Download Pretrained Weights\n",
69 | "!git lfs install\n",
70 | "!apt install aria2 -qqy\n",
71 | "\n",
72 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/BadToBest/EchoMimicV2/resolve/main/denoising_unet.pth -d /content/echomimic_v2/pretrained_weights -o denoising_unet.pth\n",
73 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/BadToBest/EchoMimicV2/resolve/main/motion_module.pth -d /content/echomimic_v2/pretrained_weights -o motion_module.pth\n",
74 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/BadToBest/EchoMimicV2/resolve/main/reference_unet.pth -d /content/echomimic_v2/pretrained_weights -o reference_unet.pth\n",
75 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/BadToBest/EchoMimicV2/resolve/main/pose_encoder.pth -d /content/echomimic_v2/pretrained_weights -o pose_encoder.pth\n",
76 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://openaipublic.azureedge.net/main/whisper/models/65147644a518d12f04e32d6f3b26facc3f8dd46e5390956a9424a650c0ce22b9/tiny.pt -d /content/echomimic_v2/pretrained_weights/audio_processor -o tiny.pt\n",
77 | "!git clone https://huggingface.co/lambdalabs/sd-image-variations-diffusers /content/echomimic_v2/pretrained_weights/sd-image-variations-diffusers\n",
78 | "!git clone https://huggingface.co/stabilityai/sd-vae-ft-mse /content/echomimic_v2/pretrained_weights/sd-vae-ft-mse"
79 | ],
80 | "metadata": {
81 | "id": "tStoe8IzpgS0"
82 | },
83 | "execution_count": null,
84 | "outputs": []
85 | },
86 | {
87 | "cell_type": "markdown",
88 | "source": [
89 | "# Launch Wit Gradio"
90 | ],
91 | "metadata": {
92 | "id": "aBYQXFVNp949"
93 | }
94 | },
95 | {
96 | "cell_type": "code",
97 | "source": [
98 | "!python app.py"
99 | ],
100 | "metadata": {
101 | "id": "E4InU1Hvrw21"
102 | },
103 | "execution_count": null,
104 | "outputs": []
105 | }
106 | ]
107 | }
--------------------------------------------------------------------------------
/memo.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "machine_shape": "hm",
8 | "gpuType": "A100"
9 | },
10 | "kernelspec": {
11 | "name": "python3",
12 | "display_name": "Python 3"
13 | },
14 | "language_info": {
15 | "name": "python"
16 | },
17 | "accelerator": "GPU"
18 | },
19 | "cells": [
20 | {
21 | "cell_type": "markdown",
22 | "source": [
23 | "# Follow my Instagram : https://www.instagram.com/xsocialandapps"
24 | ],
25 | "metadata": {
26 | "id": "IYRcnNJCd_cJ"
27 | }
28 | },
29 | {
30 | "cell_type": "markdown",
31 | "source": [
32 | "# Installation"
33 | ],
34 | "metadata": {
35 | "id": "Za5ndzdQd5OS"
36 | }
37 | },
38 | {
39 | "cell_type": "code",
40 | "execution_count": null,
41 | "metadata": {
42 | "id": "RqzLqYwKOWn7"
43 | },
44 | "outputs": [],
45 | "source": [
46 | "%cd /content\n",
47 | "!git clone https://github.com/zachysaur/memo.git\n",
48 | "%cd /content/memo\n",
49 | "!pip install torch==2.5.1+cu124 torchvision==0.20.1+cu124 torchaudio==2.5.1+cu124 torchtext==0.18.0 torchdata==0.8.0 --extra-index-url https://download.pytorch.org/whl/cu124\n",
50 | "!pip install xformers==0.0.28.post3\n",
51 | "\n",
52 | "!pip install accelerate==1.1.1 albumentations==1.4.21 audio-separator==0.24.1 black==23.12.1 diffusers==0.31.0 einops==0.8.0 ffmpeg-python==0.2.0 funasr==1.0.27 huggingface-hub==0.26.2 imageio==2.36.0\n",
53 | "!pip install imageio-ffmpeg==0.5.1 insightface==0.7.3 hydra-core==1.3.2 jax==0.4.35 mediapipe==0.10.18 modelscope==1.20.1 moviepy==1.0.3 numpy==1.26.4 omegaconf==2.3.0 onnxruntime-gpu==1.20.1\n",
54 | "!pip install opencv-python-headless==4.10.0.84 pillow==10.4.0 scikit-learn==1.5.2 scipy==1.14.1 transformers==4.46.3 tqdm==4.67.1 matplotlib matplotlib-inline\n",
55 | "\n",
56 | "!apt install aria2 ffmpeg -qqy"
57 | ]
58 | },
59 | {
60 | "cell_type": "markdown",
61 | "source": [
62 | "# Download Models"
63 | ],
64 | "metadata": {
65 | "id": "93N9stZePBYJ"
66 | }
67 | },
68 | {
69 | "cell_type": "code",
70 | "source": [
71 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/raw/main/audio_proj/config.json -d /content/memo/checkpoints/audio_proj -o config.json\n",
72 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/audio_proj/diffusion_pytorch_model.safetensors -d /content/memo/checkpoints/audio_proj -o diffusion_pytorch_model.safetensors\n",
73 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/raw/main/diffusion_net/config.json -d /content/memo/checkpoints/diffusion_net -o config.json\n",
74 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/diffusion_net/diffusion_pytorch_model.safetensors -d /content/memo/checkpoints/diffusion_net -o diffusion_pytorch_model.safetensors\n",
75 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/raw/main/image_proj/config.json -d /content/memo/checkpoints/image_proj -o config.json\n",
76 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/image_proj/diffusion_pytorch_model.safetensors -d /content/memo/checkpoints/image_proj -o diffusion_pytorch_model.safetensors\n",
77 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/raw/main/misc/audio_emotion_classifier/config.json -d /content/memo/checkpoints/misc/audio_emotion_classifier -o config.json\n",
78 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/misc/audio_emotion_classifier/diffusion_pytorch_model.safetensors -d /content/memo/checkpoints/misc/audio_emotion_classifier -o diffusion_pytorch_model.safetensors\n",
79 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/misc/face_analysis/models/1k3d68.onnx -d /content/memo/checkpoints/misc/face_analysis/models -o 1k3d68.onnx\n",
80 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/misc/face_analysis/models/2d106det.onnx -d /content/memo/checkpoints/misc/face_analysis/models -o 2d106det.onnx\n",
81 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/misc/face_analysis/models/face_landmarker_v2_with_blendshapes.task -d /content/memo/checkpoints/misc/face_analysis/models -o face_landmarker_v2_with_blendshapes.task\n",
82 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/misc/face_analysis/models/genderage.onnx -d /content/memo/checkpoints/misc/face_analysis/models -o genderage.onnx\n",
83 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/misc/face_analysis/models/glintr100.onnx -d /content/memo/checkpoints/misc/face_analysis/models -o glintr100.onnx\n",
84 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/misc/face_analysis/models/scrfd_10g_bnkps.onnx -d /content/memo/checkpoints/misc/face_analysis/models -o scrfd_10g_bnkps.onnx\n",
85 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/misc/vocal_separator/Kim_Vocal_2.onnx -d /content/memo/checkpoints/misc/vocal_separator -o Kim_Vocal_2.onnx\n",
86 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/raw/main/misc/vocal_separator/download_checks.json -d /content/memo/checkpoints/misc/vocal_separator -o download_checks.json\n",
87 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/raw/main/misc/vocal_separator/mdx_model_data.json -d /content/memo/checkpoints/misc/vocal_separator -o mdx_model_data.json\n",
88 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/raw/main/misc/vocal_separator/vr_model_data.json -d /content/memo/checkpoints/misc/vocal_separator -o vr_model_data.json\n",
89 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/raw/main/reference_net/config.json -d /content/memo/checkpoints/reference_net -o config.json\n",
90 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/memoavatar/memo/resolve/main/reference_net/diffusion_pytorch_model.safetensors -d /content/memo/checkpoints/reference_net -o diffusion_pytorch_model.safetensors\n",
91 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/sd-vae-ft-mse/resolve/main/diffusion_pytorch_model.safetensors -d /content/memo/checkpoints/vae -o diffusion_pytorch_model.safetensors\n",
92 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/sd-vae-ft-mse/raw/main/config.json -d /content/memo/checkpoints/vae -o config.json\n",
93 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/facebook/wav2vec2-base-960h/resolve/main/model.safetensors -d /content/memo/checkpoints/wav2vec2 -o model.safetensors\n",
94 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/facebook/wav2vec2-base-960h/raw/main/config.json -d /content/memo/checkpoints/wav2vec2 -o config.json\n",
95 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/facebook/wav2vec2-base-960h/raw/main/preprocessor_config.json -d /content/memo/checkpoints/wav2vec2 -o preprocessor_config.json\n",
96 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/emotion2vec/emotion2vec_plus_large/resolve/main/model.pt -d /content/memo/checkpoints/emotion2vec_plus_large -o model.pt\n",
97 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/emotion2vec/emotion2vec_plus_large/raw/main/config.yaml -d /content/memo/checkpoints/emotion2vec_plus_large -o config.yaml\n",
98 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/emotion2vec/emotion2vec_plus_large/raw/main/configuration.json -d /content/memo/checkpoints/emotion2vec_plus_large -o configuration.json\n",
99 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/emotion2vec/emotion2vec_plus_large/raw/main/tokens.txt -d /content/memo/checkpoints/emotion2vec_plus_large -o tokens.txt"
100 | ],
101 | "metadata": {
102 | "id": "IGR6r1lFO-9a"
103 | },
104 | "execution_count": null,
105 | "outputs": []
106 | },
107 | {
108 | "cell_type": "code",
109 | "source": [
110 | "%cd /content/memo\n",
111 | "!python inference.py --config configs/inference.yaml --input_image assets/examples/dicaprio.jpg --input_audio assets/examples/speech.wav --output_dir outputs"
112 | ],
113 | "metadata": {
114 | "id": "s2ny44IeQfqC"
115 | },
116 | "execution_count": null,
117 | "outputs": []
118 | }
119 | ]
120 | }
--------------------------------------------------------------------------------
/liveportriattalker.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "gpuType": "T4"
8 | },
9 | "kernelspec": {
10 | "name": "python3",
11 | "display_name": "Python 3"
12 | },
13 | "language_info": {
14 | "name": "python"
15 | },
16 | "accelerator": "GPU"
17 | },
18 | "cells": [
19 | {
20 | "cell_type": "markdown",
21 | "source": [
22 | "https://www.youtube.com/@socialapps1194"
23 | ],
24 | "metadata": {
25 | "id": "QVQnYiEbPcoW"
26 | }
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "source": [
31 | "\n",
32 | "\n",
33 | ""
34 | ],
35 | "metadata": {
36 | "id": "3XxLOjTKM_4m"
37 | }
38 | },
39 | {
40 | "cell_type": "markdown",
41 | "source": [
42 | "Follow my instagram https://www.instagram.com/xsocialandapps/"
43 | ],
44 | "metadata": {
45 | "id": "mpSAqDGnOTK9"
46 | }
47 | },
48 | {
49 | "cell_type": "markdown",
50 | "source": [
51 | "# Installation"
52 | ],
53 | "metadata": {
54 | "id": "DbiD9hbeN2YX"
55 | }
56 | },
57 | {
58 | "cell_type": "code",
59 | "execution_count": null,
60 | "metadata": {
61 | "id": "j34AObu779FM"
62 | },
63 | "outputs": [],
64 | "source": [
65 | "%cd /content\n",
66 | "!git clone https://github.com/zachysaur/liveportrait_talker.git\n",
67 | "%cd liveportrait_talker\n",
68 | "!pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n",
69 | "!pip install -r requirements.txt\n",
70 | "!pip install onnxruntime-gpu==1.18.0"
71 | ]
72 | },
73 | {
74 | "cell_type": "markdown",
75 | "source": [
76 | "# Download models"
77 | ],
78 | "metadata": {
79 | "id": "hk6FVdiUNF6F"
80 | }
81 | },
82 | {
83 | "cell_type": "code",
84 | "source": [
85 | "!sh scripts/download_models.sh"
86 | ],
87 | "metadata": {
88 | "id": "DyT717-6945j"
89 | },
90 | "execution_count": null,
91 | "outputs": []
92 | },
93 | {
94 | "cell_type": "markdown",
95 | "source": [
96 | "# Synthetic Head Pose Generation\n"
97 | ],
98 | "metadata": {
99 | "id": "DLqEbW-pNRdk"
100 | }
101 | },
102 | {
103 | "cell_type": "code",
104 | "source": [
105 | "!python inference.py --config_path config.yaml --source_path /content/liveportrait_talker/src/Z.png --audio_path /content/liveportrait_talker/src/audio.wav --save_path /content/liveportrait_talker/src/\n"
106 | ],
107 | "metadata": {
108 | "id": "6Esg0gS3-Vz7"
109 | },
110 | "execution_count": null,
111 | "outputs": []
112 | },
113 | {
114 | "cell_type": "markdown",
115 | "source": [
116 | "# Reference Head Pose"
117 | ],
118 | "metadata": {
119 | "id": "Y4Tik9YzNdmc"
120 | }
121 | },
122 | {
123 | "cell_type": "code",
124 | "source": [
125 | "!python inference.py --config_path config.yaml --source_path /content/liveportrait_talker/src/Z.png --audio_path /content/liveportrait_talker/src/audio.wav --save_path /content/liveportrait_talker/src/ --ref_head_pose_path /content/liveportrait_talker/src/5.mp4\n"
126 | ],
127 | "metadata": {
128 | "id": "wbC_DbftCeFU"
129 | },
130 | "execution_count": null,
131 | "outputs": []
132 | },
133 | {
134 | "cell_type": "markdown",
135 | "source": [
136 | "# ref_frames_from_zero"
137 | ],
138 | "metadata": {
139 | "id": "iMUcENfMNurF"
140 | }
141 | },
142 | {
143 | "cell_type": "code",
144 | "source": [
145 | "!python inference.py --config_path config.yaml --source_path /content/liveportrait_talker/src/Z.png --audio_path /content/liveportrait_talker/src/audio.wav --save_path /content/liveportrait_talker/src/ --ref_head_pose_path /content/liveportrait_talker/src/5.mp4 --ref_frames_from_zero\n"
146 | ],
147 | "metadata": {
148 | "id": "P1HRjteAIVel"
149 | },
150 | "execution_count": null,
151 | "outputs": []
152 | },
153 | {
154 | "cell_type": "markdown",
155 | "source": [
156 | "# Still"
157 | ],
158 | "metadata": {
159 | "id": "RLYcduXINoKs"
160 | }
161 | },
162 | {
163 | "cell_type": "code",
164 | "source": [
165 | "!python inference.py --config_path config.yaml --source_path /content/liveportrait_talker/src/Z.png --audio_path /content/liveportrait_talker/src/audio.wav --save_path /content/liveportrait_talker/src/ --still"
166 | ],
167 | "metadata": {
168 | "id": "BoKQQz0wIgil"
169 | },
170 | "execution_count": null,
171 | "outputs": []
172 | }
173 | ]
174 | }
--------------------------------------------------------------------------------
/Omnigen.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "id": "NnkBdp2u_A44"
7 | },
8 | "source": [
9 | ""
10 | ]
11 | },
12 | {
13 | "cell_type": "markdown",
14 | "metadata": {
15 | "id": "-TKbNygr-ygQ"
16 | },
17 | "source": [
18 | "# Follow my instagram : https://www.instagram.com/xsocialandapps/"
19 | ]
20 | },
21 | {
22 | "cell_type": "markdown",
23 | "metadata": {
24 | "id": "H-da-DRE-gsJ"
25 | },
26 | "source": [
27 | "# Installation"
28 | ]
29 | },
30 | {
31 | "cell_type": "code",
32 | "execution_count": null,
33 | "metadata": {
34 | "id": "XFPZ8_NZhbig"
35 | },
36 | "outputs": [],
37 | "source": [
38 | "!git clone https://github.com/VectorSpaceLab/OmniGen.git\n",
39 | "%cd OmniGen\n",
40 | "!pip install -e .\n",
41 | "!pip install gradio spaces\n",
42 | "!python app.py --share"
43 | ]
44 | }
45 | ],
46 | "metadata": {
47 | "accelerator": "GPU",
48 | "colab": {
49 | "gpuType": "T4",
50 | "provenance": []
51 | },
52 | "kernelspec": {
53 | "display_name": "Python 3",
54 | "name": "python3"
55 | },
56 | "language_info": {
57 | "name": "python"
58 | }
59 | },
60 | "nbformat": 4,
61 | "nbformat_minor": 0
62 | }
--------------------------------------------------------------------------------
/RMBG_2_Studio.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "provenance": [],
7 | "gpuType": "T4"
8 | },
9 | "kernelspec": {
10 | "name": "python3",
11 | "display_name": "Python 3"
12 | },
13 | "language_info": {
14 | "name": "python"
15 | },
16 | "accelerator": "GPU"
17 | },
18 | "cells": [
19 | {
20 | "cell_type": "markdown",
21 | "source": [
22 | ""
23 | ],
24 | "metadata": {
25 | "id": "icBbqKYM_Oq9"
26 | }
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "source": [
31 | "# Follow my instagram : https://www.instagram.com/xsocialandapps/\n"
32 | ],
33 | "metadata": {
34 | "id": "iH-8sok--8XJ"
35 | }
36 | },
37 | {
38 | "cell_type": "code",
39 | "execution_count": null,
40 | "metadata": {
41 | "id": "p-lDPMd25itu"
42 | },
43 | "outputs": [],
44 | "source": [
45 | "%cd /content\n",
46 | "!git clone https://github.com/zachysaur/RMBG-2-Studio.git\n",
47 | "%cd RMBG-2-Studio/app\n",
48 | "!pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n",
49 | "!pip install -r requirements.txt"
50 | ]
51 | },
52 | {
53 | "cell_type": "code",
54 | "source": [
55 | "!python /content/RMBG-2-Studio/app/app.py"
56 | ],
57 | "metadata": {
58 | "id": "qZwE4PKV6ZAs"
59 | },
60 | "execution_count": null,
61 | "outputs": []
62 | }
63 | ]
64 | }
--------------------------------------------------------------------------------
/Remove_Video_Background.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "id": "NnkBdp2u_A44"
7 | },
8 | "source": [
9 | ""
10 | ]
11 | },
12 | {
13 | "cell_type": "markdown",
14 | "metadata": {
15 | "id": "-TKbNygr-ygQ"
16 | },
17 | "source": [
18 | "# Follow my instagram : https://www.instagram.com/xsocialandapps/"
19 | ]
20 | },
21 | {
22 | "cell_type": "markdown",
23 | "metadata": {
24 | "id": "H-da-DRE-gsJ"
25 | },
26 | "source": [
27 | "# Installation"
28 | ]
29 | },
30 | {
31 | "cell_type": "code",
32 | "execution_count": null,
33 | "metadata": {
34 | "id": "XFPZ8_NZhbig"
35 | },
36 | "outputs": [],
37 | "source": [
38 | "%cd /content\n",
39 | "!git clone https://github.com/zachysaur/video-background-remove.git\n",
40 | "%cd video-background-remove/BRIA-RMBG-2.0-Video\n",
41 | "!pip install -r requirements.txt\n",
42 | "!pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n",
43 | "!pip install onnxruntime-gpu==1.18.0\n"
44 | ]
45 | },
46 | {
47 | "cell_type": "markdown",
48 | "metadata": {
49 | "id": "jPfV0Is1-uVH"
50 | },
51 | "source": [
52 | "# Run with gradio"
53 | ]
54 | },
55 | {
56 | "cell_type": "code",
57 | "execution_count": null,
58 | "metadata": {
59 | "colab": {
60 | "background_save": true
61 | },
62 | "id": "NXu5T9Vf1LCQ"
63 | },
64 | "outputs": [],
65 | "source": [
66 | "!python /content/video-background-remove/BRIA-RMBG-2.0-Video/app.py"
67 | ]
68 | }
69 | ],
70 | "metadata": {
71 | "accelerator": "GPU",
72 | "colab": {
73 | "gpuType": "T4",
74 | "provenance": []
75 | },
76 | "kernelspec": {
77 | "display_name": "Python 3",
78 | "name": "python3"
79 | },
80 | "language_info": {
81 | "name": "python"
82 | }
83 | },
84 | "nbformat": 4,
85 | "nbformat_minor": 0
86 | }
--------------------------------------------------------------------------------