sam2 update
Browse files- fix_git_auth.sh +59 -0
- sam2.1_hiera_large.pt +3 -0
fix_git_auth.sh
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Fix Git LFS Authentication for Hugging Face Space
|
| 3 |
+
|
| 4 |
+
echo "🔐 Setting up Hugging Face Git Authentication"
|
| 5 |
+
echo ""
|
| 6 |
+
echo "You have 3 options to fix the Git LFS authentication error:"
|
| 7 |
+
echo ""
|
| 8 |
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
| 9 |
+
echo "Option 1: Use Hugging Face Token in URL (Quick Fix)"
|
| 10 |
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
| 11 |
+
echo ""
|
| 12 |
+
echo "1. Get your HF token from: https://huggingface.co/settings/tokens"
|
| 13 |
+
echo "2. Run this command:"
|
| 14 |
+
echo ""
|
| 15 |
+
echo " git remote set-url origin https://YOUR_USERNAME:YOUR_TOKEN@huggingface.co/spaces/SammyLim/VideoMaMa"
|
| 16 |
+
echo ""
|
| 17 |
+
echo " Replace YOUR_USERNAME with your HF username"
|
| 18 |
+
echo " Replace YOUR_TOKEN with your HF token"
|
| 19 |
+
echo ""
|
| 20 |
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
| 21 |
+
echo "Option 2: Use Git Credential Helper (Recommended)"
|
| 22 |
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
| 23 |
+
echo ""
|
| 24 |
+
echo "1. Install huggingface-cli:"
|
| 25 |
+
echo " pip install huggingface-hub"
|
| 26 |
+
echo ""
|
| 27 |
+
echo "2. Login to Hugging Face:"
|
| 28 |
+
echo " huggingface-cli login"
|
| 29 |
+
echo ""
|
| 30 |
+
echo "3. Configure git to use HF credentials:"
|
| 31 |
+
echo " git config --global credential.helper store"
|
| 32 |
+
echo ""
|
| 33 |
+
echo "4. Then push again:"
|
| 34 |
+
echo " git push"
|
| 35 |
+
echo ""
|
| 36 |
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
| 37 |
+
echo "Option 3: Don't Push Large Files (Alternative)"
|
| 38 |
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
| 39 |
+
echo ""
|
| 40 |
+
echo "If you don't want to push the sam2.1_hiera_large.pt file:"
|
| 41 |
+
echo ""
|
| 42 |
+
echo "1. Add it to .gitignore:"
|
| 43 |
+
echo " echo 'sam2.1_hiera_large.pt' >> .gitignore"
|
| 44 |
+
echo ""
|
| 45 |
+
echo "2. Remove from Git LFS tracking (if needed):"
|
| 46 |
+
echo " git rm --cached sam2.1_hiera_large.pt"
|
| 47 |
+
echo ""
|
| 48 |
+
echo "3. Update your download_checkpoints.sh to download it on Space startup"
|
| 49 |
+
echo ""
|
| 50 |
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
| 51 |
+
echo ""
|
| 52 |
+
echo "⚠️ Current Status:"
|
| 53 |
+
echo " - Git is trying to push LFS file via commit: dc30125"
|
| 54 |
+
echo " - File deleted but still in Git history"
|
| 55 |
+
echo " - LFS needs authentication to push"
|
| 56 |
+
echo ""
|
| 57 |
+
echo "💡 Recommendation:"
|
| 58 |
+
echo " Use Option 2 (credential helper) for best security and convenience"
|
| 59 |
+
echo ""
|
sam2.1_hiera_large.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2647878d5dfa5098f2f8649825738a9345572bae2d4350a2468587ece47dd318
|
| 3 |
+
size 898083611
|