Open disposeablehero opened 3 weeks ago
So it's seems to be content-disposition issues with wget and signed aws redirects after the server accepts the token. Since I'm lazy I just wrote a separate if statement for HF links, but I'm wondering if there's some super simple wget setting I overlooked (curl seems to have the same issues, content-disposition just names the downloaded file "?model-blah-blah"
function provisioning_download() {
if [[ -n $HF_TOKEN && $1 =~ ^https://([a-zA-Z0-9_-]+\.)?huggingface\.co(/|$|\?) ]]; then
auth_token="$HF_TOKEN"
if [[ -n $auth_token ]];then
wget --header="Authorization: Bearer $auth_token" -qnc --content-disposition --show-progress -e dotbytes="${3:-4M}" -P "$2" "$1"
else
wget -qnc --content-disposition --show-progress -e dotbytes="${3:-4M}" -P "$2" "$1"
fi
elif
[[ -n $CIVITAI_TOKEN && $1 =~ ^https://([a-zA-Z0-9_-]+\.)?civitai\.com(/|$|\?) ]]; then
auth_token="$CIVITAI_TOKEN"
if [[ -n $auth_token ]];then
wget -qnc --content-disposition --show-progress -e dotbytes="${3:-4M}" -P "$2" "${1}&token=${auth_token}"
else
wget -qnc --content-disposition --show-progress -e dotbytes="${3:-4M}" -P "$2" "$1"
fi
fi
}
I'm switching all scripts to curl which does not have this issue.
Files from civitai links seems to be having issues with wget, including the one already in the default.sh in the lora array (though commented out). The command as written works just fine when manually entered on the command line so I'm somewhat at a loss.