game-asset-generator-pipeline / deploy_local.ps1
Xernive's picture
fix: revert to API client with better error handling (Hunyuan3D not pip-installable)
26f8b9a
# Deploy LOCAL Hunyuan3D to V2 Space
# This makes your space use YOUR L4 GPU instead of external APIs!
Write-Host "=" * 60
Write-Host "Deploying LOCAL Hunyuan3D-2.1"
Write-Host "=" * 60
Write-Host "`nBenefits:"
Write-Host " - No more quota issues"
Write-Host " - Faster generation"
Write-Host " - More reliable"
Write-Host " - Actually using your L4 GPU!"
# Check if we're in the right directory
if (!(Test-Path "generators/hunyuan_local.py")) {
Write-Host "`n❌ Error: Must run from huggingface-space-v2 directory"
Write-Host "Current directory: $(Get-Location)"
exit 1
}
Write-Host "`n[1/4] Checking git status..."
git status
Write-Host "`n[2/4] Adding changes..."
git add generators/hunyuan_local.py
git add generators/__init__.py
git add core/pipeline.py
git add requirements.txt
git add DEPLOY_LOCAL_HUNYUAN.md
Write-Host "`n[3/4] Committing changes..."
git commit -m "feat: use LOCAL Hunyuan3D on L4 GPU
- Added HunyuanLocalGenerator for local model execution
- Updated requirements.txt with Hunyuan3D-2.1 dependencies
- Changed pipeline to use local generator instead of API client
- Benefits:
* No more ZeroGPU quota issues
* Faster generation (no network overhead)
* More reliable (self-contained)
* Actually using the L4 GPU we're paying for!
Model will download on first run (~5GB)
First generation will be slower (model loading)
Subsequent generations will be fast (~30-90s)"
Write-Host "`n[4/4] Pushing to Hugging Face..."
git push
Write-Host "`n✅ Deployment complete!"
Write-Host "`nSpace will rebuild (10-15 minutes)"
Write-Host " - Model will download (~5GB)"
Write-Host " - First generation will load model (~30-60s)"
Write-Host " - Subsequent generations will be fast (~30-90s)"
Write-Host "`nMonitor at: https://huggingface.co/spaces/Xernive/game-asset-generator-pipeline"
Write-Host "`nAfter rebuild, test with:"
Write-Host " python test_v2_after_l4_upgrade.py"
Write-Host "`n🎯 No more quota issues! Your L4 GPU will do ALL the work!"