#!/bin/bash # Create necessary directories mkdir -p ./pretrained_models/audio_seperator mkdir -p ./pretrained_models/face_analysis/models mkdir -p ./pretrained_models/hallo mkdir -p ./pretrained_models/motion_module mkdir -p ./pretrained_models/sd-vae-ft-mse mkdir -p ./pretrained_models/stable-diffusion-v1-5/unet mkdir -p ./pretrained_models/wav2vec/wav2vec2-base-960h # Download the weights from Hugging Face repository # Assuming the necessary URLs are accessible directly wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/audio_separator/Kim_Vocal_2.onnx -O ./pretrained_models/audio_seperator/models/Kim_Vocal_2.onnx wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/audio_separator/download_checks.json -O ./pretrained_models/audio_seperator/models/download_checks.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/audio_separator/mdx_model_data.json -O ./pretrained_models/audio_seperator/models/mdx_model_data.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/audio_separator/vr_model_data.json -O ./pretrained_models/audio_seperator/models/vr_model_data.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/face_analysis/models/1k3d68.onnx -O ./pretrained_models/face_analysis/models/1k3d68.onnx wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/face_analysis/models/2d106det.onnx -O ./pretrained_models/face_analysis/models/2d106det.onnx wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/face_analysis/models/face_landmarker_v2_with_blendshapes.task -O ./pretrained_models/face_analysis/models/face_landmarker_v2_with_blendshapes.task wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/face_analysis/models/genderage.onnx -O ./pretrained_models/face_analysis/models/genderage.onnx wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/face_analysis/models/glintr100.onnx -O ./pretrained_models/face_analysis/models/glintr100.onnx wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/face_analysis/models/scrfd_10g_bnkps.onnx -O ./pretrained_models/face_analysis/models/scrfd_10g_bnkps.onnx wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/hallo/net.pth -O ./pretrained_models/hallo/net.pth wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/motion_module/mm_sd_v15_v2.ckpt -O ./pretrained_models/motion_module/mm_sd_v15_v2.ckpt wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/sd-vae-ft-mse/.gitattributes -O ./pretrained_models/sd-vae-ft-mse/.gitattributes wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/sd-vae-ft-mse/README.md -O ./pretrained_models/sd-vae-ft-mse/README.md wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/sd-vae-ft-mse/config.json -O ./pretrained_models/sd-vae-ft-mse/config.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/sd-vae-ft-mse/diffusion_pytorch_model.safetensors -O ./pretrained_models/sd-vae-ft-mse/diffusion_pytorch_model.safetensors wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/stable-diffusion-v1-5/unet/config.json -O ./pretrained_models/stable-diffusion-v1-5/unet/config.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/stable-diffusion-v1-5/unet/diffusion_pytorch_model.safetensors -O ./pretrained_models/stable-diffusion-v1-5/unet/diffusion_pytorch_model.safetensors wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/wav2vec/wav2vec2-base-960h/.gitattributes -O ./pretrained_models/wav2vec/wav2vec2-base-960h/.gitattributes wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/wav2vec/wav2vec2-base-960h/README.md -O ./pretrained_models/wav2vec/wav2vec2-base-960h/README.md wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/wav2vec/wav2vec2-base-960h/config.json -O ./pretrained_models/wav2vec/wav2vec2-base-960h/config.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/wav2vec/wav2vec2-base-960h/feature_extractor_config.json -O ./pretrained_models/wav2vec/wav2vec2-base-960h/feature_extractor_config.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/wav2vec/wav2vec2-base-960h/model.safetensors -O ./pretrained_models/wav2vec/wav2vec2-base-960h//model.safetensors wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/wav2vec/wav2vec2-base-960h/preprocessor_config.json -O ./pretrained_models/wav2vec/wav2vec2-base-960h/preprocessor_config.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/wav2vec/wav2vec2-base-960h/special_tokens_map.json -O ./pretrained_models/wav2vec/wav2vec2-base-960h/special_tokens_map.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/wav2vec/wav2vec2-base-960h/tokenizer_config.json -O ./pretrained_models/wav2vec/wav2vec2-base-960h/tokenizer_config.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/wav2vec/wav2vec2-base-960h/vocab.json -O ./pretrained_models/wav2vec/wav2vec2-base-960h/vocab.json wget -nc https://huggingface.co/fudan-generative-ai/hallo/resolve/main/config.json -O ./pretrained_models/config.json # List the downloaded files for verification echo "Listing pretrained_models folder content:" ls -la ./pretrained_models