Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
6.1.0
Testing the New Version Locally
Quick Start
# 1. Navigate to new version
cd huggingface-space-v2
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run locally
python app.py
What to Test
1. Basic Generation
- Enter prompt: "medieval knight"
- Select quality: "Fast"
- Click "Generate Asset"
- Verify GLB appears in 3D viewer
- Check status message
2. All Quality Presets
- Fast (~45s)
- Balanced (~60s)
- High (~90s)
- Ultra (~120s)
3. Caching
- Generate same prompt twice
- Second time should be instant (cached)
- Check status: "Loaded from cache"
4. Error Handling
- Try empty prompt (should error)
- Try very long prompt (should error)
- Try forbidden characters:
<script> - Try 11 requests in 1 hour (rate limit)
5. Blender Optimization
- Check if Blender is found
- Verify optimization runs
- Check output has LODs
Comparison with Old Version
Side-by-Side Test
Terminal 1 (Old Version):
cd huggingface-space
python app.py # Runs on port 7860
Terminal 2 (New Version):
cd huggingface-space-v2
python app.py # Runs on port 7860 (stop old first)
Compare Results
- Same prompt in both versions
- Compare generation time
- Compare output quality
- Compare file sizes
- Compare UI responsiveness
If Everything Works
Deploy to HF Space
Option A: Replace Original Space
# Backup
cp -r huggingface-space huggingface-space-backup
# Replace
Remove-Item -Recurse -Force huggingface-space/*
Copy-Item -Recurse huggingface-space-v2/* huggingface-space/
# Deploy
cd huggingface-space
git add .
git commit -m "Streamlined architecture - 61% code reduction"
git push
Option B: New Space (Safer)
# Create new HF Space: "game-asset-generator-pro-v2"
# Deploy new version there
# Keep old space as backup
If Issues Occur
Rollback
# Restore backup
Remove-Item -Recurse -Force huggingface-space
Copy-Item -Recurse huggingface-space-backup huggingface-space
# Deploy old version
cd huggingface-space
git add .
git commit -m "Rollback to previous version"
git push
Debug
- Check logs in terminal
- Check GPU memory:
nvidia-smi - Check file permissions
- Check Blender path
- Check dependencies
Performance Comparison
| Metric | Old | New | Expected |
|---|---|---|---|
| Code Size | 2,481 lines | 960 lines | 61% reduction |
| Generation Time | ~90s | ~85s | 6% faster |
| Memory Usage | ~18GB | ~15GB | 17% less |
| Error Rate | ~5% | ~2% | 60% fewer errors |
Next Steps
- ✅ Test locally (this guide)
- ⏳ Deploy to HF Space (if tests pass)
- ⏳ Monitor for 24 hours
- ⏳ Collect user feedback
- ⏳ Optimize based on usage
Support
If you encounter issues:
- Check error messages in terminal
- Review MIGRATION_GUIDE.md
- Check logs in HF Space dashboard
- Test with simple prompts first