Skip to content

Commit

Permalink
fix: handle HF_TOKEN not set problem (#81)
Browse files Browse the repository at this point in the history
This commit ensure that if the HF_TOKEN is not set the command can still
execute if the user has logged in using the huggingface-cli.
  • Loading branch information
rickstaa authored May 12, 2024
1 parent 22c5bf5 commit e48856d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runner/dl_checkpoints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if [ "$MODE" = "alpha" ]; then
# Download image-to-video models (token-gated).
printf "\nDownloading token-gated models...\n"
check_hf_auth
huggingface-cli download stabilityai/stable-video-diffusion-img2vid-xt-1-1 --include "*.fp16.safetensors" "*.json" --cache-dir models "${TOKEN_FLAG}"
huggingface-cli download stabilityai/stable-video-diffusion-img2vid-xt-1-1 --include "*.fp16.safetensors" "*.json" --cache-dir models "${TOKEN_FLAG:+$TOKEN_FLAG}"

printf "\nAlpha models downloaded successfully!\n"
else
Expand All @@ -85,7 +85,7 @@ else
# Download image-to-video models (token-gated).
printf "\nDownloading token-gated models...\n"
check_hf_auth
huggingface-cli download stabilityai/stable-video-diffusion-img2vid-xt-1-1 --include "*.fp16.safetensors" "*.json" --cache-dir models "${TOKEN_FLAG}"
huggingface-cli download stabilityai/stable-video-diffusion-img2vid-xt-1-1 --include "*.fp16.safetensors" "*.json" --cache-dir models "${TOKEN_FLAG:+$TOKEN_FLAG}"

printf "\nAll models downloaded successfully!\n"
fi

0 comments on commit e48856d

Please sign in to comment.