|
#!/bin/bash |
|
|
|
mkdir -p ./models/checkpoints |
|
mkdir -p ./models/controlnet |
|
mkdir -p ./models/embeddings |
|
mkdir -p ./models/loras |
|
mkdir -p ./models/motion |
|
mkdir -p ./models/text_encoders |
|
mkdir -p ./models/upscalers |
|
mkdir -p ./output |
|
mkdir -p ./workflows |
|
|
|
|
|
if ! command -v huggingface-cli &> /dev/null; then |
|
pip install huggingface_hub |
|
fi |
|
|
|
|
|
export HF_TOKEN=${HF_TOKEN:-"your_huggingface_api_token"} |
|
|
|
|
|
echo "Downloading models from original Hugging Face repositories..." |
|
|
|
huggingface-cli download --token ${HF_TOKEN} stabilityai/stable-diffusion-3.5-large sd3.5_large.safetensors --local-dir ./models/checkpoints |
|
|
|
|
|
huggingface-cli download --token ${HF_TOKEN} your-username/dance-lora dance_lora.safetensors --local-dir ./models/loras |
|
|
|
|
|
|
|
|
|
huggingface-cli download --token ${HF_TOKEN} guoyww/animatediff mm_sd_v15_v2.ckpt --local-dir ./models/motion |
|
|
|
|
|
huggingface-cli download --token ${HF_TOKEN} stabilityai/sd-vae-ft-mse-original vae-ft-mse-840000-ema-pruned.safetensors --local-dir ./models/vae |
|
|
|
|
|
huggingface-cli download --token ${HF_TOKEN} lllyasviel/ControlNet-v1-1 control_v11p_sd15_openpose.pth --local-dir ./models/controlnet |
|
huggingface-cli download --token ${HF_TOKEN} lllyasviel/ControlNet-v1-1 control_v11p_sd15_canny.pth --local-dir ./models/controlnet |
|
|
|
|
|
echo "Installing ComfyUI custom nodes for SD 3.5 and motion..." |
|
pip install git+https://github.com/civitai/sd3-comfyui.git |
|
git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git ./models/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite |
|
|
|
|
|
if ! command -v rclone &> /dev/null; then |
|
curl https://rclone.org/install.sh | sudo bash |
|
fi |
|
|
|
|
|
rclone copy r2bucket:output ./output --create-empty-src-dirs |
|
|
|
|
|
nohup bash -c "while true; do rclone sync ./output r2bucket:output; sleep 3600; done" & |
|
|
|
|
|
echo "Models and structure ready for ComfyUI deployment. Push to Hugging Face and use in SimplePod." |