This commit is contained in:
XXXXRT666 2025-05-12 18:15:24 +01:00
parent bf4ca1602e
commit 74c7e723c2

View File

@ -16,6 +16,23 @@ Remove-Item "$srcDir\.git" -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "[INFO] Creating tmp dir..." Write-Host "[INFO] Creating tmp dir..."
New-Item -ItemType Directory -Force -Path $tmpDir | Out-Null New-Item -ItemType Directory -Force -Path $tmpDir | Out-Null
Write-Host "[INFO] Downloading Python..."
$pyUrl = "https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-pc-windows-msvc-pgo-full.tar.zst"
$zst = "$tmpDir\python.tar.zst"
Invoke-WebRequest $pyUrl -OutFile $zst
Get-ChildItem
Get-ChildItem $tmpDir
Write-Host "0000"
& "C:\Program Files\7-Zip\7z.exe" e $zst -o$tmpDir -aoa | Out-Null
Get-ChildItem $tmpDir
Write-Host "11111"
$tar = Get-ChildItem "$tmpDir" -Filter "*.tar" | Select-Object -First 1
Get-ChildItem $tmpDir
Write-Host "222222"
& "C:\Program Files\7-Zip\7z.exe" x $tar.FullName -o$tmpDir\extracted -aoa | Out-Null
Get-ChildItem $tmpDir
Move-Item "$tmpDir\extracted\python\install" "$srcDir\runtime"
$baseHF = "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main" $baseHF = "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main"
$PRETRAINED_URL = "$baseHF/pretrained_models.zip" $PRETRAINED_URL = "$baseHF/pretrained_models.zip"
$G2PW_URL = "$baseHF/G2PWModel.zip" $G2PW_URL = "$baseHF/G2PWModel.zip"
@ -57,20 +74,6 @@ Move-Item "$($ffDir.FullName)\bin\ffprobe.exe" "$srcDir"
Remove-Item $ffZip Remove-Item $ffZip
Remove-Item $ffDir.FullName -Recurse -Force Remove-Item $ffDir.FullName -Recurse -Force
Write-Host "[INFO] Downloading Python..."
$pyUrl = "https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-pc-windows-msvc-pgo-full.tar.zst"
$zst = "$tmpDir\python.tar.zst"
Invoke-WebRequest $pyUrl -OutFile $zst
Get-ChildItem
Get-ChildItem $tmpDir
& "C:\Program Files\7-Zip\7z.exe" e $zst -o$tmpDir -aoa | Out-Null
Get-ChildItem $tmpDir
Write-Host "11111"
$tar = Get-ChildItem "$tmpDir" -Filter "*.tar" | Select-Object -First 1
Get-ChildItem $tmpDir
& "C:\Program Files\7-Zip\7z.exe" x $tar.FullName -o$tmpDir\extracted -aoa | Out-Null
Move-Item "$tmpDir\extracted\python\install" "$srcDir\runtime"
Write-Host "[INFO] Installing PyTorch..." Write-Host "[INFO] Installing PyTorch..."
$torchCmd = switch ($cuda) { $torchCmd = switch ($cuda) {
"cu124" { "pip install torch==2.5.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124" } "cu124" { "pip install torch==2.5.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124" }