# Standalone YuE2 only. Never install into Comfy's Python environment. [CmdletBinding()] param( [string]$Root = 'C:\Users\ianjm\Development\YuE2', [string]$Uv = 'uv' ) $ErrorActionPreference = 'Stop' $Root = [IO.Path]::GetFullPath($Root) function Run([string]$Exe, [string[]]$Arguments) { & $Exe @Arguments if ($LASTEXITCODE -ne 0) { throw "$Exe failed ($LASTEXITCODE)" } } if (!(Test-Path -LiteralPath $Root)) { Run git @('clone', 'https://github.com/multimodal-art-projection/YuE.git', $Root) } Run $Uv @('venv', '--allow-existing', '--python', '3.12', (Join-Path $Root '.venv')) $python = Join-Path $Root '.venv\Scripts\python.exe' Run $Uv @('pip', 'install', '--python', $python, 'torch', 'torchaudio', '--index-url', 'https://download.pytorch.org/whl/cu128') Run $Uv @('pip', 'install', '--python', $python, '-e', $Root) Run $Uv @('pip', 'install', '--python', $python, 'soundfile', 'psutil') Run $python @('-c', 'import torch; from yue2 import YuE2Pipeline; assert torch.cuda.is_available(); print(torch.__version__, torch.cuda.get_device_name(0))') @{ model='m-a-p/YuE2-3B'; vae='m-a-p/YuE2-Vae'; python=$python } | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $Root 'aigen-ready.json') -Encoding utf8 Write-Host "YuE2 ready at $Root. Set YUE2_ROOT / YUE2_PYTHON on the GPU host if needed. Weights download from Hugging Face on first song. No Comfy environment was modified."