Spaces:
Running
on
Zero
Setting Up Model Hub for Checkpoints
Step-by-Step Guide
Step 1: Create Model Hub Repository
- Go to: https://huggingface.co/new
- Select: "Model" (not Space or Dataset)
- Fill in:
- Repository name:
starflow-3b-checkpoint - Owner:
GlobalStudio(or your username) - Visibility: Private (recommended) or Public
- Repository name:
- Click: "Create repository"
Step 2: Upload Checkpoint to Model Hub
Go to your Model repository: https://huggingface.co/GlobalStudio/starflow-3b-checkpoint
Click: "Files" tab
Click: "Add file" β "Upload files"
Upload:
starflow_3B_t2i_256x256.pth(14GB)- Drag and drop or browse
- Wait for upload (30-60 minutes)
- β No storage limit issues in Model Hub!
Step 3: Update app.py (Already Done!)
The app is already configured! Just make sure the repo ID matches:
IMAGE_CHECKPOINT_REPO = "GlobalStudio/starflow-3b-checkpoint"
If your repo name is different, update this line in app.py.
Step 4: Test Your Space
- Go to your Space: https://huggingface.co/spaces/GlobalStudio/starflow
- Wait for rebuild (if app.py was updated)
- Open the Gradio interface
- Enter a prompt (no need to upload checkpoint!)
- Click "Generate Image"
- First time: Will download checkpoint (one-time, ~5-10 minutes)
- After that: Uses cached checkpoint (fast!)
How It Works
First Request:
- App checks for local checkpoint β Not found
- Downloads from Model Hub β
/tmp/checkpoints/ - Caches it for future use
Subsequent Requests:
- Uses cached checkpoint β Fast!
- No download needed
Cache Location:
/tmp/checkpoints/(persists in Space)
Benefits
β No storage limit - Model Hub designed for large files β Free - No cost for Model Hub storage β Automatic caching - Downloads once, uses forever β Version control - Can update checkpoints easily β Shareable - Can use across multiple Spaces
Troubleshooting
Issue: "Repository not found"
- Solution: Make sure repo ID matches exactly:
"username/repo-name" - Check: https://huggingface.co/GlobalStudio/starflow-3b-checkpoint exists
Issue: "Download failed"
- Solution: Check internet connection, repo visibility (private repos need auth)
- For private repos, set HF_TOKEN in Space settings
Issue: "Checkpoint not found"
- Solution: Verify filename matches exactly:
starflow_3B_t2i_256x256.pth - Check Model Hub Files tab to confirm filename
For Video Model (Optional)
If you also have the video checkpoint:
- Create another Model repo:
starflow-v-7b-checkpoint - Upload:
starflow-v_7B_t2v_caus_480p_v3.pth - Update app.py:
VIDEO_CHECKPOINT_REPO = "GlobalStudio/starflow-v-7b-checkpoint"
Summary
- β Create Model Hub repo
- β Upload checkpoint (14GB, no limit!)
- β App already configured
- β Test and enjoy!
The app will automatically download and cache the checkpoint on first use! π