|
#!/bin/bash |
|
|
|
|
|
BLUE='\033[0;34m' |
|
RED='\033[0;31m' |
|
GREEN='\033[0;32m' |
|
NC='\033[0m' |
|
|
|
|
|
download_checkpoint() { |
|
local url="$1" |
|
local dir="$2" |
|
local filename="$3" |
|
local overwrite="$4" |
|
|
|
|
|
mkdir -p "$dir" |
|
|
|
|
|
if [ -e "$dir/$filename" ] && [ "$overwrite" != "overwrite" ]; then |
|
echo -e "The ${BLUE}$filename${NC} checkpoint already exists in $dir." |
|
else |
|
|
|
echo -e "Downloading ${BLUE}$filename${NC} checkpoint..." |
|
if wget -q --show-progress "$url" -O "$dir/$filename"; then |
|
echo -e "${GREEN}Download successful.${NC}" |
|
else |
|
echo -e "${RED}Download failed.${NC}" |
|
fi |
|
fi |
|
} |
|
|
|
|
|
url="https://huggingface.co./lucas-ventura/CoVR/resolve/main/webvid-covr.ckpt" |
|
dir="outputs/webvid-covr/blip-large/blip-l-coco/tv-False_loss-hnnce_lr-1e-05/good/" |
|
filename="ckpt_4.ckpt" |
|
|
|
|
|
download_checkpoint "$url" "$dir" "$filename" "$1" |
|
|
|
|
|
url="https://huggingface.co./lucas-ventura/CoVR/resolve/main/cirr_ft-covr%2Bgt.ckpt" |
|
dir="outputs/cirr/blip-large/webvid-covr/tv-False_loss-hnnce_lr-0.0001/base/" |
|
filename="ckpt_5.ckpt" |
|
|
|
|
|
download_checkpoint "$url" "$dir" "$filename" "$1" |
|
|