Update runpod.io.sh
Browse files- runpod.io.sh +6 -6
runpod.io.sh
CHANGED
|
@@ -801,11 +801,11 @@ function provisioning_has_valid_hf_token() {
|
|
| 801 |
}
|
| 802 |
|
| 803 |
function provisioning_has_valid_civitai_token() {
|
| 804 |
-
[[ -n "
|
| 805 |
url="https://civitai.com/api/v1/models?hidden=1&limit=1"
|
| 806 |
|
| 807 |
response=$(curl -o /dev/null -s -w "%{http_code}" -X GET "$url" \
|
| 808 |
-
-H "Authorization: Bearer
|
| 809 |
-H "Content-Type: application/json")
|
| 810 |
|
| 811 |
if [ "$response" -eq 200 ]; then
|
|
@@ -838,8 +838,8 @@ function download_civitai_bash() {
|
|
| 838 |
return 0
|
| 839 |
fi
|
| 840 |
printf "Downloading to: %s\n" "$forced_filename"
|
| 841 |
-
if [[ -n "
|
| 842 |
-
curl -L -o "$output_file" --progress-bar -H "Authorization: Bearer
|
| 843 |
else
|
| 844 |
curl -L -o "$output_file" --progress-bar "$url"
|
| 845 |
fi
|
|
@@ -853,8 +853,8 @@ function download_civitai_bash() {
|
|
| 853 |
fi
|
| 854 |
|
| 855 |
local redirect_url=""
|
| 856 |
-
if [[ -n "
|
| 857 |
-
redirect_url=$(curl -s -I -L -H "Authorization: Bearer
|
| 858 |
else
|
| 859 |
redirect_url=$(curl -s -I -L "$url" | grep -i "^location:" | tail -1 | sed 's/location: //i' | tr -d '\r\n')
|
| 860 |
fi
|
|
|
|
| 801 |
}
|
| 802 |
|
| 803 |
function provisioning_has_valid_civitai_token() {
|
| 804 |
+
[[ -n "a881da881b7c01e808f1fb7843092a11" ]] || return 1
|
| 805 |
url="https://civitai.com/api/v1/models?hidden=1&limit=1"
|
| 806 |
|
| 807 |
response=$(curl -o /dev/null -s -w "%{http_code}" -X GET "$url" \
|
| 808 |
+
-H "Authorization: Bearer a881da881b7c01e808f1fb7843092a11" \
|
| 809 |
-H "Content-Type: application/json")
|
| 810 |
|
| 811 |
if [ "$response" -eq 200 ]; then
|
|
|
|
| 838 |
return 0
|
| 839 |
fi
|
| 840 |
printf "Downloading to: %s\n" "$forced_filename"
|
| 841 |
+
if [[ -n "a881da881b7c01e808f1fb7843092a11" ]]; then
|
| 842 |
+
curl -L -o "$output_file" --progress-bar -H "Authorization: Bearer a881da881b7c01e808f1fb7843092a11" "$url"
|
| 843 |
else
|
| 844 |
curl -L -o "$output_file" --progress-bar "$url"
|
| 845 |
fi
|
|
|
|
| 853 |
fi
|
| 854 |
|
| 855 |
local redirect_url=""
|
| 856 |
+
if [[ -n "a881da881b7c01e808f1fb7843092a11" ]]; then
|
| 857 |
+
redirect_url=$(curl -s -I -L -H "Authorization: Bearer a881da881b7c01e808f1fb7843092a11" "$url" | grep -i "^location:" | tail -1 | sed 's/location: //i' | tr -d '\r\n')
|
| 858 |
else
|
| 859 |
redirect_url=$(curl -s -I -L "$url" | grep -i "^location:" | tail -1 | sed 's/location: //i' | tr -d '\r\n')
|
| 860 |
fi
|