Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Update setup.ps1

Roland Tannous400b6ecede30
diff --git a/studio/setup.ps1 b/studio/setup.ps1
index 61db138ee4c..8b662e1998d 100644
--- a/studio/setup.ps1
+++ b/studio/setup.ps1
@@ -488,69 +488,49 @@ if ($CudaArch) {
}
# ============================================
-# 1f. Node.js / npm (always -- needed regardless of install method)
+# 1f. Node.js / npm (skip if pip-installed -- only needed for frontend build)
# ============================================
-# setup.sh installs Node LTS (v22) via nvm. We enforce the same range here:
-# Node >= 20, npm >= 11.
-$NeedNode = $true
-try {
- $NodeVersion = (node -v 2>$null)
- $NpmVersion = (npm -v 2>$null)
- if ($NodeVersion -and $NpmVersion) {
- $NodeMajor = [int]($NodeVersion -replace 'v','').Split('.')[0]
- $NpmMajor = [int]$NpmVersion.Split('.')[0]
-
- if ($NodeMajor -ge 20 -and $NpmMajor -ge 11) {
- Write-Host "[OK] Node $NodeVersion and npm $NpmVersion already meet requirements." -ForegroundColor Green
- $NeedNode = $false
- } else {
- Write-Host "[WARN] Node $NodeVersion / npm $NpmVersion too old." -ForegroundColor Yellow
- }
- }
-} catch {
- Write-Host "[WARN] Node/npm not found." -ForegroundColor Yellow
-}
-
-if ($NeedNode) {
- Write-Host "Installing Node.js LTS via winget..." -ForegroundColor Cyan
+if ($IsPipInstall) {
+ Write-Host "[OK] Running from pip install - frontend already bundled, skipping Node/npm check" -ForegroundColor Green
+} else {
+ # setup.sh installs Node LTS (v22) via nvm. We enforce the same range here:
+ # Node >= 20, npm >= 11.
+ $NeedNode = $true
try {
- winget install OpenJS.NodeJS.LTS --source winget --accept-package-agreements --accept-source-agreements
- Refresh-Environment
+ $NodeVersion = (node -v 2>$null)
+ $NpmVersion = (npm -v 2>$null)
+ if ($NodeVersion -and $NpmVersion) {
+ $NodeMajor = [int]($NodeVersion -replace 'v','').Split('.')[0]
+ $NpmMajor = [int]$NpmVersion.Split('.')[0]
+
+ if ($NodeMajor -ge 20 -and $NpmMajor -ge 11) {
+ Write-Host "[OK] Node $NodeVersion and npm $NpmVersion already meet requirements." -ForegroundColor Green
+ $NeedNode = $false
+ } else {
+ Write-Host "[WARN] Node $NodeVersion / npm $NpmVersion too old." -ForegroundColor Yellow
+ }
+ }
} catch {
- Write-Host "[ERROR] Could not install Node.js automatically." -ForegroundColor Red
- Write-Host "Please install Node.js >= 20 from https://nodejs.org/" -ForegroundColor Red
- exit 1
+ Write-Host "[WARN] Node/npm not found." -ForegroundColor Yellow
}
-}
-Write-Host "[OK] Node $(node -v) | npm $(npm -v)" -ForegroundColor Green
-
-# ============================================
-# 1g. FFmpeg (required for audio model support)
-# ============================================
-$HasFFmpeg = $null -ne (Get-Command ffmpeg -ErrorAction SilentlyContinue)
-if (-not $HasFFmpeg) {
- Write-Host "FFmpeg not found -- installing via winget..." -ForegroundColor Yellow
- $HasWinget = $null -ne (Get-Command winget -ErrorAction SilentlyContinue)
- if ($HasWinget) {
+ if ($NeedNode) {
+ Write-Host "Installing Node.js LTS via winget..." -ForegroundColor Cyan
try {
- winget install -e --id Gyan.FFmpeg --source winget --accept-package-agreements --accept-source-agreements 2>&1 | Out-Null
+ winget install OpenJS.NodeJS.LTS --source winget --accept-package-agreements --accept-source-agreements
Refresh-Environment
- $HasFFmpeg = $null -ne (Get-Command ffmpeg -ErrorAction SilentlyContinue)
- } catch { }
- }
- if (-not $HasFFmpeg) {
- Write-Host "[WARN] FFmpeg could not be installed automatically." -ForegroundColor Yellow
- Write-Host " Install FFmpeg from https://ffmpeg.org/download.html and re-run." -ForegroundColor Yellow
- } else {
- Write-Host "[OK] FFmpeg installed: $(ffmpeg -version | Select-Object -First 1)" -ForegroundColor Green
+ } catch {
+ Write-Host "[ERROR] Could not install Node.js automatically." -ForegroundColor Red
+ Write-Host "Please install Node.js >= 20 from https://nodejs.org/" -ForegroundColor Red
+ exit 1
+ }
}
-} else {
- Write-Host "[OK] FFmpeg found: $(ffmpeg -version | Select-Object -First 1)" -ForegroundColor Green
+
+ Write-Host "[OK] Node $(node -v) | npm $(npm -v)" -ForegroundColor Green
}
# ============================================
-# 1h. Python (>= 3.11 and < 3.14, matching setup.sh)
+# 1g. Python (>= 3.11 and < 3.14, matching setup.sh)
# ============================================
$HasPython = $null -ne (Get-Command python -ErrorAction SilentlyContinue)
$PythonOk = $false
@@ -1034,6 +1014,6 @@ Write-Host "| Setup Complete! |" -ForegroundColor
Write-Host "| |" -ForegroundColor Green
Write-Host "| IMPORTANT: Open a NEW terminal, then run: |" -ForegroundColor Yellow
Write-Host "| |" -ForegroundColor Green
-Write-Host "| unsloth-studio -H 0.0.0.0 -p 8000 |" -ForegroundColor Green
+Write-Host "| unsloth studio -H 0.0.0.0 -p 8000 |" -ForegroundColor Green
Write-Host "| |" -ForegroundColor Green
Write-Host "+===============================================+" -ForegroundColor Green