Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions curl_download_weights.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/bin/bash

# Set the checkpoints directory
CheckpointsDir="models"

# Create necessary directories
mkdir -p models/musetalk models/musetalkV15 models/syncnet models/dwpose models/face-parse-bisent models/sd-vae models/whisper

# Install required packages with correct version to avoid conflicts
echo "Installing dependencies..."
pip install -U "huggingface_hub[cli]<1.0,>=0.19.3"
pip install gdown aria2

# Set HuggingFace mirror endpoint for faster downloads (optional)
# Uncomment one of these if downloads are slow:
# export HF_ENDPOINT=https://hf-mirror.com # China mirror
# export HF_ENDPOINT=https://hf.co # Alternative

# Use 'hf' command with resume capability
HF_CMD="hf"

echo "Using command: $HF_CMD"

# Download MuseTalk V1.0 weights (using direct URL for faster download)
echo "Downloading MuseTalk V1.0 weights..."
mkdir -p $CheckpointsDir/musetalk
curl -L --progress-bar --create-dirs -C - \
-o $CheckpointsDir/musetalk/pytorch_model.bin \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalk/pytorch_model.bin"
curl -L --progress-bar \
-o $CheckpointsDir/musetalk/musetalk.json \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalk/musetalk.json"

# Download MuseTalk V1.5 weights (using direct URL)
echo "Downloading MuseTalk V1.5 weights..."
mkdir -p $CheckpointsDir/musetalkV15
curl -L --progress-bar --create-dirs -C - \
-o $CheckpointsDir/musetalkV15/unet.pth \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalkV15/unet.pth"
curl -L --progress-bar \
-o $CheckpointsDir/musetalkV15/musetalk.json \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalkV15/musetalk.json"

# Download SD VAE weights
echo "Downloading SD VAE weights..."
$HF_CMD download stabilityai/sd-vae-ft-mse \
--local-dir $CheckpointsDir/sd-vae \
--include "config.json" "diffusion_pytorch_model.bin"

# Download Whisper weights
echo "Downloading Whisper weights..."
$HF_CMD download openai/whisper-tiny \
--local-dir $CheckpointsDir/whisper \
--include "config.json" "pytorch_model.bin" "preprocessor_config.json"

# Download DWPose weights
echo "Downloading DWPose weights..."
$HF_CMD download yzd-v/DWPose \
--local-dir $CheckpointsDir/dwpose \
--include "dw-ll_ucoco_384.pth"

# Download SyncNet weights
echo "Downloading SyncNet weights..."
$HF_CMD download ByteDance/LatentSync \
--local-dir $CheckpointsDir/syncnet \
--include "latentsync_syncnet.pt"

# Download Face Parse Bisent weights
echo "Downloading Face Parse Bisent weights..."
gdown --id 154JgKpzCPW82qINcVieuPH3fZ2e0P812 -O $CheckpointsDir/face-parse-bisent/79999_iter.pth

echo "Downloading ResNet18 weights..."
curl -L --progress-bar \
-o $CheckpointsDir/face-parse-bisent/resnet18-5c106cde.pth \
https://download.pytorch.org/models/resnet18-5c106cde.pth

echo "✅ All weights have been downloaded successfully!"
90 changes: 90 additions & 0 deletions download
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/bin/bash

# Set the checkpoints directory
CheckpointsDir="models"

# Create necessary directories
mkdir -p models/musetalk models/musetalkV15 models/syncnet models/dwpose models/face-parse-bisent models/sd-vae models/whisper

# Install required packages
echo "Installing dependencies..."
pip install -U "huggingface_hub[cli]<1.0,>=0.19.3"
pip install gdown
sudo apt-get install -y aria2 # or: brew install aria2 on Mac

# Function for fast download with aria2c
fast_download() {
local url=$1
local output=$2
aria2c -x 16 -s 16 -k 1M -c --auto-file-renaming=false --allow-overwrite=true -d "$(dirname "$output")" -o "$(basename "$output")" "$url"
}

echo "Using aria2c for faster downloads..."

# Download MuseTalk V1.0 weights
echo "Downloading MuseTalk V1.0 weights..."
mkdir -p $CheckpointsDir/musetalk
fast_download \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalk/pytorch_model.bin" \
"$CheckpointsDir/musetalk/pytorch_model.bin"
fast_download \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalk/musetalk.json" \
"$CheckpointsDir/musetalk/musetalk.json"

# Download MuseTalk V1.5 weights
echo "Downloading MuseTalk V1.5 weights..."
mkdir -p $CheckpointsDir/musetalkV15
fast_download \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalkV15/unet.pth" \
"$CheckpointsDir/musetalkV15/unet.pth"
fast_download \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalkV15/musetalk.json" \
"$CheckpointsDir/musetalkV15/musetalk.json"

# Download SD VAE weights
echo "Downloading SD VAE weights..."
mkdir -p $CheckpointsDir/sd-vae
fast_download \
"https://huggingface.co/stabilityai/sd-vae-ft-mse/resolve/main/config.json" \
"$CheckpointsDir/sd-vae/config.json"
fast_download \
"https://huggingface.co/stabilityai/sd-vae-ft-mse/resolve/main/diffusion_pytorch_model.bin" \
"$CheckpointsDir/sd-vae/diffusion_pytorch_model.bin"

# Download Whisper weights
echo "Downloading Whisper weights..."
mkdir -p $CheckpointsDir/whisper
fast_download \
"https://huggingface.co/openai/whisper-tiny/resolve/main/config.json" \
"$CheckpointsDir/whisper/config.json"
fast_download \
"https://huggingface.co/openai/whisper-tiny/resolve/main/pytorch_model.bin" \
"$CheckpointsDir/whisper/pytorch_model.bin"
fast_download \
"https://huggingface.co/openai/whisper-tiny/resolve/main/preprocessor_config.json" \
"$CheckpointsDir/whisper/preprocessor_config.json"

# Download DWPose weights
echo "Downloading DWPose weights..."
mkdir -p $CheckpointsDir/dwpose
fast_download \
"https://huggingface.co/yzd-v/DWPose/resolve/main/dw-ll_ucoco_384.pth" \
"$CheckpointsDir/dwpose/dw-ll_ucoco_384.pth"

# Download SyncNet weights
echo "Downloading SyncNet weights..."
mkdir -p $CheckpointsDir/syncnet
fast_download \
"https://huggingface.co/ByteDance/LatentSync/resolve/main/latentsync_syncnet.pt" \
"$CheckpointsDir/syncnet/latentsync_syncnet.pt"

# Download Face Parse Bisent weights
echo "Downloading Face Parse Bisent weights..."
gdown --id 154JgKpzCPW82qINcVieuPH3fZ2e0P812 -O $CheckpointsDir/face-parse-bisent/79999_iter.pth

echo "Downloading ResNet18 weights..."
fast_download \
"https://download.pytorch.org/models/resnet18-5c106cde.pth" \
"$CheckpointsDir/face-parse-bisent/resnet18-5c106cde.pth"

echo "✅ All weights have been downloaded successfully!"
37 changes: 26 additions & 11 deletions download_weights.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,61 @@ CheckpointsDir="models"
# Create necessary directories
mkdir -p models/musetalk models/musetalkV15 models/syncnet models/dwpose models/face-parse-bisent models/sd-vae models/whisper

# Install required packages
pip install -U "huggingface_hub[cli]"
# Install required packages with correct version to avoid conflicts
echo "Installing dependencies..."
pip install -U "huggingface_hub[cli]<1.0,>=0.19.3"
pip install gdown
export HF_HUB_ENABLE_HF_TRANSFER=1
# Set HuggingFace mirror endpoint (optional, comment out if you want to use default)
# export HF_ENDPOINT=https://hf-mirror.com

# Set HuggingFace mirror endpoint
export HF_ENDPOINT=https://hf-mirror.com
# Use 'hf' command directly (modern HuggingFace CLI)
HF_CMD="hf"

echo "Using command: $HF_CMD"

# Download MuseTalk V1.0 weights
huggingface-cli download TMElyralab/MuseTalk \
echo "Downloading MuseTalk V1.0 weights..."
$HF_CMD download TMElyralab/MuseTalk \
--local-dir $CheckpointsDir \
--include "musetalk/musetalk.json" "musetalk/pytorch_model.bin"

# Download MuseTalk V1.5 weights (unet.pth)
huggingface-cli download TMElyralab/MuseTalk \
echo "Downloading MuseTalk V1.5 weights..."
$HF_CMD download TMElyralab/MuseTalk \
--local-dir $CheckpointsDir \
--include "musetalkV15/musetalk.json" "musetalkV15/unet.pth"

# Download SD VAE weights
huggingface-cli download stabilityai/sd-vae-ft-mse \
echo "Downloading SD VAE weights..."
$HF_CMD download stabilityai/sd-vae-ft-mse \
--local-dir $CheckpointsDir/sd-vae \
--include "config.json" "diffusion_pytorch_model.bin"

# Download Whisper weights
huggingface-cli download openai/whisper-tiny \
echo "Downloading Whisper weights..."
$HF_CMD download openai/whisper-tiny \
--local-dir $CheckpointsDir/whisper \
--include "config.json" "pytorch_model.bin" "preprocessor_config.json"

# Download DWPose weights
huggingface-cli download yzd-v/DWPose \
echo "Downloading DWPose weights..."
$HF_CMD download yzd-v/DWPose \
--local-dir $CheckpointsDir/dwpose \
--include "dw-ll_ucoco_384.pth"

# Download SyncNet weights
huggingface-cli download ByteDance/LatentSync \
echo "Downloading SyncNet weights..."
$HF_CMD download ByteDance/LatentSync \
--local-dir $CheckpointsDir/syncnet \
--include "latentsync_syncnet.pt"

# Download Face Parse Bisent weights
echo "Downloading Face Parse Bisent weights..."
gdown --id 154JgKpzCPW82qINcVieuPH3fZ2e0P812 -O $CheckpointsDir/face-parse-bisent/79999_iter.pth

echo "Downloading ResNet18 weights..."
curl -L https://download.pytorch.org/models/resnet18-5c106cde.pth \
-o $CheckpointsDir/face-parse-bisent/resnet18-5c106cde.pth

echo "✅ All weights have been downloaded successfully!"
echo "✅ All weights have been downloaded successfully!"
90 changes: 90 additions & 0 deletions fast_download_weights.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/bin/bash

# Set the checkpoints directory
CheckpointsDir="models"

# Create necessary directories
mkdir -p models/musetalk models/musetalkV15 models/syncnet models/dwpose models/face-parse-bisent models/sd-vae models/whisper

# Install required packages
echo "Installing dependencies..."
pip install -U "huggingface_hub[cli]<1.0,>=0.19.3"
pip install gdown
sudo apt-get install -y aria2 # or: brew install aria2 on Mac

# Function for fast download with aria2c
fast_download() {
local url=$1
local output=$2
aria2c -x 16 -s 16 -k 1M -c --auto-file-renaming=false --allow-overwrite=true -d "$(dirname "$output")" -o "$(basename "$output")" "$url"
}

echo "Using aria2c for faster downloads..."

# Download MuseTalk V1.0 weights
echo "Downloading MuseTalk V1.0 weights..."
mkdir -p $CheckpointsDir/musetalk
fast_download \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalk/pytorch_model.bin" \
"$CheckpointsDir/musetalk/pytorch_model.bin"
fast_download \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalk/musetalk.json" \
"$CheckpointsDir/musetalk/musetalk.json"

# Download MuseTalk V1.5 weights
echo "Downloading MuseTalk V1.5 weights..."
mkdir -p $CheckpointsDir/musetalkV15
fast_download \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalkV15/unet.pth" \
"$CheckpointsDir/musetalkV15/unet.pth"
fast_download \
"https://huggingface.co/TMElyralab/MuseTalk/resolve/main/musetalkV15/musetalk.json" \
"$CheckpointsDir/musetalkV15/musetalk.json"

# Download SD VAE weights
echo "Downloading SD VAE weights..."
mkdir -p $CheckpointsDir/sd-vae
fast_download \
"https://huggingface.co/stabilityai/sd-vae-ft-mse/resolve/main/config.json" \
"$CheckpointsDir/sd-vae/config.json"
fast_download \
"https://huggingface.co/stabilityai/sd-vae-ft-mse/resolve/main/diffusion_pytorch_model.bin" \
"$CheckpointsDir/sd-vae/diffusion_pytorch_model.bin"

# Download Whisper weights
echo "Downloading Whisper weights..."
mkdir -p $CheckpointsDir/whisper
fast_download \
"https://huggingface.co/openai/whisper-tiny/resolve/main/config.json" \
"$CheckpointsDir/whisper/config.json"
fast_download \
"https://huggingface.co/openai/whisper-tiny/resolve/main/pytorch_model.bin" \
"$CheckpointsDir/whisper/pytorch_model.bin"
fast_download \
"https://huggingface.co/openai/whisper-tiny/resolve/main/preprocessor_config.json" \
"$CheckpointsDir/whisper/preprocessor_config.json"

# Download DWPose weights
echo "Downloading DWPose weights..."
mkdir -p $CheckpointsDir/dwpose
fast_download \
"https://huggingface.co/yzd-v/DWPose/resolve/main/dw-ll_ucoco_384.pth" \
"$CheckpointsDir/dwpose/dw-ll_ucoco_384.pth"

# Download SyncNet weights
echo "Downloading SyncNet weights..."
mkdir -p $CheckpointsDir/syncnet
fast_download \
"https://huggingface.co/ByteDance/LatentSync/resolve/main/latentsync_syncnet.pt" \
"$CheckpointsDir/syncnet/latentsync_syncnet.pt"

# Download Face Parse Bisent weights
echo "Downloading Face Parse Bisent weights..."
gdown --id 154JgKpzCPW82qINcVieuPH3fZ2e0P812 -O $CheckpointsDir/face-parse-bisent/79999_iter.pth

echo "Downloading ResNet18 weights..."
fast_download \
"https://download.pytorch.org/models/resnet18-5c106cde.pth" \
"$CheckpointsDir/face-parse-bisent/resnet18-5c106cde.pth"

echo "✅ All weights have been downloaded successfully!"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ huggingface_hub==0.30.2
librosa==0.11.0
einops==0.8.1
gradio==5.24.0
chumpy==0.71

gdown
requests
Expand Down