| name | modelscope-lfs-upload |
| description | Guide for uploading large files to ModelScope using Git LFS. Use when users need to upload large files, datasets, or models to ModelScope. |
| license | MIT |
ModelScope Git LFS Upload Guide
About This Skill
This skill provides step-by-step instructions for uploading large files to ModelScope using Git LFS, including specific guidance for the test case provided.
When to Use
Use this skill when:
- Uploading large files (>100MB) to ModelScope
- Uploading datasets or models to ModelScope
- Following the test case requirements
Test Case Instructions
For the test case, follow these specific steps:
- Clone the repository using the provided OAuth URL
- Configure Git LFS for large file support
- Add files to the repository
- Push to ModelScope
Prerequisites
- Git and Git LFS installed
- ModelScope account
- Git access token from ModelScope
Step-by-Step Guide
1. Install Git LFS
git lfs install
2. Clone the Repository
Use the provided OAuth URL:
git clone https://oauth2:ms-c1b331d2-38ea-47f8-960b-8f3ac78f59ba@www.modelscope.cn/datasets/syliubupt2025/ixi_bupt_mcx_shiyu.git
3. Configure Git LFS Tracking
git lfs track "*.pt"
git lfs track "*.pth"
git lfs track "*.ckpt"
git lfs track "*.bin"
git lfs track "*.zip"
git lfs track "*.tar.gz"
git lfs track "data/**"
git lfs track "models/**"
4. Add and Commit Files
git add .
git commit -m "Add large files"
5. Push to ModelScope
git push origin main
Test Case Specific Instructions
For the provided test case:
-
Clone the repository:
git clone https://oauth2:ms-c1b331d2-38ea-47f8-960b-8f3ac78f59ba@www.modelscope.cn/datasets/syliubupt2025/ixi_bupt_mcx_shiyu.git
-
Navigate to the repository:
cd ixi_bupt_mcx_shiyu
-
Install Git LFS:
git lfs install
-
Configure Git LFS tracking for your large files:
git lfs track "*.pt" "*.pth" "*.ckpt" "*.bin" "*.zip" "*.tar.gz"
-
Add your large files to the repository:
git add .
-
Commit and push:
git commit -m "Add large files"
git push origin main
Troubleshooting
Git LFS Authentication Issues
If you encounter authentication issues, ensure:
- Your OAuth token is correct and has the necessary permissions
- You're using the full OAuth URL format
- Git is configured with your credentials
Large File Pushing Issues
-
Increase Git buffer size if pushing very large files:
git config http.postBuffer 524288000
-
Check network connectivity if pushes fail
-
Verify Git LFS is properly installed
Best Practices
- Track only large files with Git LFS (typically >100MB)
- Use .gitattributes to define LFS tracking rules
- Test with small files first before uploading large datasets
- Monitor push progress for large uploads
- Use descriptive commit messages for better version control
Output Example
When successful, you'll see output like:
Uploading LFS objects: 100% (3/3), 1.2 GB | 10.5 MB/s, done.
Enumerating objects: 15, done.
Counting objects: 100% (15/15), done.
Delta compression using up to 8 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (15/15), 2.15 KiB | 2.15 KiB/s, done.
Total 15 (delta 3), reused 0 (delta 0), pack-reused 0
To https://www.modelscope.cn/datasets/syliubupt2025/ixi_bupt_mcx_shiyu.git
1a2b3c4..5d6e7f8 main -> main