| #!/usr/bin/env bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| set -euo pipefail |
|
|
| REPO_ID="${REPO_ID:-FluidInference/styletts2-libritts-coreml}" |
| REPO_TYPE="model" |
| COMMIT_MSG="${COMMIT_MSG:-Initial CoreML conversion of StyleTTS2 LibriTTS (PR #46)}" |
|
|
| cd "$(dirname "$0")" |
|
|
| if [[ "${1-}" == "--create" ]]; then |
| echo "==> Creating repo $REPO_ID (private; flip with --public after license review)" |
| huggingface-cli repo create "$REPO_ID" --type "$REPO_TYPE" -y --private |
| fi |
|
|
| echo "==> Target: https://huggingface.co/$REPO_ID" |
| echo "==> Reminder: this repo's weights inherit yl4579/StyleTTS2 use restrictions" |
| echo " (synthetic-origin disclosure + voice-clone consent). The model card" |
| echo " (README.md) surfaces them. Keep the repo gated until you've confirmed" |
| echo " the license terms in the model card match upstream." |
| echo |
|
|
| if [[ "${COPY-0}" == "1" ]]; then |
| STAGE="$(mktemp -d -t styletts2-hf-XXXXXX)" |
| echo "==> COPY=1: materializing symlinks into $STAGE" |
| rsync -aL ./ "$STAGE/" |
| SRC="$STAGE" |
| else |
| SRC="." |
| fi |
|
|
| echo "==> Uploading $SRC → $REPO_ID" |
| huggingface-cli upload "$REPO_ID" "$SRC" . \ |
| --repo-type "$REPO_TYPE" \ |
| --commit-message "$COMMIT_MSG" |
|
|
| if [[ "${COPY-0}" == "1" ]]; then |
| echo "==> Cleaning $STAGE" |
| rm -rf "$STAGE" |
| fi |
|
|
| echo |
| echo "==> Done. Visit https://huggingface.co/$REPO_ID/settings" |
| echo " - Set repo to GATED (manual approval) until license posture is confirmed." |
| echo " - Add the upstream license restrictions to the access-request prompt." |
|
|