-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_real_sadtalker.py
More file actions
44 lines (35 loc) · 1.26 KB
/
install_real_sadtalker.py
File metadata and controls
44 lines (35 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
"""Install real SadTalker using official method."""
import os
import subprocess
import sys
from pathlib import Path
def install_sadtalker():
"""Install SadTalker using official repository."""
# Clone official SadTalker
if not Path("SadTalker").exists():
print("Cloning SadTalker repository...")
subprocess.run([
"git", "clone",
"https://github.com/OpenTalker/SadTalker.git"
], check=True)
os.chdir("SadTalker")
# Install requirements
print("Installing requirements...")
subprocess.run([
sys.executable, "-m", "pip", "install",
"torch", "torchvision", "torchaudio", "--index-url", "https://download.pytorch.org/whl/cu118"
], check=True)
subprocess.run([
sys.executable, "-m", "pip", "install",
"-r", "requirements.txt"
], check=True)
# Download models using official script
print("Downloading models...")
if os.name == 'nt': # Windows
subprocess.run(["bash", "scripts/download_models.sh"], shell=True, check=True)
else:
subprocess.run(["bash", "scripts/download_models.sh"], check=True)
print("SadTalker installation complete!")
if __name__ == "__main__":
install_sadtalker()