File size: 1,158 Bytes
506c69b 98de181 506c69b | 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 | @echo off
setlocal
set "ROOT=%~dp0"
if "%ROOT:~-1%"=="\" set "ROOT=%ROOT:~0,-1%"
set "MODELS=%ROOT%\models"
set "HF_REPO=ZDisket/MOSS-TTS-PNY-GGUF"
if not exist "%MODELS%" mkdir "%MODELS%"
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$ErrorActionPreference='Stop';" ^
"$repo='%HF_REPO%';" ^
"$out='%MODELS%';" ^
"$files=@(" ^
" 'moss-tts-pny-f16.gguf'," ^
" 'moss-tts-pny-global-q8_0.gguf'," ^
" 'moss-tts-pny-global-q6_k.gguf'," ^
" 'moss-audio-decoder4-f16.gguf'," ^
" 'moss-audio-decoder4-q8_0.gguf'," ^
" 'moss-tts-qwen2-tokenizer.gguf'," ^
" 'istftnet2_decoder.onnx'," ^
" 'istftnet2-vocoder-f16.gguf'" ^
");" ^
"foreach ($f in $files) {" ^
" $dst=Join-Path $out $f;" ^
" if (Test-Path $dst) { Write-Host ('Already exists: '+$f); continue }" ^
" $url='https://huggingface.co/'+$repo+'/resolve/main/'+$f+'?download=true';" ^
" Write-Host ('Downloading '+$f);" ^
" Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $dst;" ^
"}" ^
"Write-Host 'Done.'"
if errorlevel 1 (
echo.
echo Model download failed.
pause
exit /b 1
)
echo.
echo Models are ready in "%MODELS%".
pause
|