From 358b4795b6475c4f4c3a5acab1325851a8bb2695 Mon Sep 17 00:00:00 2001 From: "J.J. Hoesing" Date: Thu, 26 Feb 2026 03:12:34 -0800 Subject: [PATCH] Add `--mkpath` to rsync args to handle the case where `.cache/huggingface/hub` doesn't already exist on the destination. --- hf-download.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hf-download.sh b/hf-download.sh index cc798c0..c4c8d9f 100755 --- a/hf-download.sh +++ b/hf-download.sh @@ -42,7 +42,7 @@ copy_model_to_host() { local host_copy_start host_copy_end host_copy_time host_copy_start=$(date +%s) - if rsync -av --progress "$model_dir" "${SSH_USER}@${host}:$HUB_PATH/"; then + if rsync -av --mkpath --progress "$model_dir" "${SSH_USER}@${host}:$HUB_PATH/"; then host_copy_end=$(date +%s) host_copy_time=$((host_copy_end - host_copy_start)) printf "Copy to %s completed in %02d:%02d:%02d\n" "$host" $((host_copy_time/3600)) $((host_copy_time%3600/60)) $((host_copy_time%60))