File size: 2,002 Bytes
26f8b9a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# 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!"