Xernive's picture
fix: revert to API client with better error handling (Hunyuan3D not pip-installable)
26f8b9a
# Deploy Hunyuan3D API fix to V2 Space
# This pushes the corrected generators/hunyuan.py to Hugging Face
Write-Host "=" * 60
Write-Host "Deploying Hunyuan3D API Fix to V2 Space"
Write-Host "=" * 60
# Check if we're in the right directory
if (!(Test-Path "generators/hunyuan.py")) {
Write-Host "❌ Error: Must run from huggingface-space-v2 directory"
Write-Host "Current directory: $(Get-Location)"
exit 1
}
Write-Host "`n[1/5] Checking git status..."
git status
Write-Host "`n[2/5] Adding changes..."
git add generators/hunyuan.py
git add core/
git add utils/
Write-Host "`n[3/5] Committing changes..."
git commit -m "fix: correct Hunyuan3D API call (remove invalid output_type parameter)
- Removed invalid output_type='mesh' parameter
- Updated response parsing to handle 4-element tuple correctly
- Added robust error handling for each tuple element
- Added detailed logging for debugging
- Verified against Hunyuan3D-2.1 API documentation"
Write-Host "`n[4/5] Pushing to Hugging Face..."
git push
Write-Host "`n[5/5] Deployment complete!"
Write-Host "`nSpace will rebuild automatically (5-10 minutes)"
Write-Host "Monitor 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"