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.

Stop the PowerShell progress bar throttling installer downloads to 0.65 MB/s (#8476)

Daniel Han5c6a01fa0c3c
diff --git a/install.ps1 b/install.ps1
index d28de3feaf3..ef32540e590 100644
--- a/install.ps1
+++ b/install.ps1
@@ -55,6 +55,14 @@ function Install-UnslothStudio {
# shadows the caller's table for this scope and below only.
$PSDefaultParameterValues = $_UnslothKeptDefaults
+ # Windows PowerShell 5.1 redraws the Invoke-WebRequest progress bar on every read, and the
+ # redraw, not the link, sets the rate: on a windows-latest runner the python.org installer
+ # (27.8 MB) took 41.34s with the bar on against 0.08s with it off, and the uv archive the
+ # same. That is the multi-minute "slow download" users report. -UseBasicParsing does NOT
+ # avoid it and PowerShell 7 never had the cost; only this preference does. Same scoping rule
+ # as the table above: no qualifier, so the caller's own preference survives "irm ... | iex".
+ $ProgressPreference = 'SilentlyContinue'
+
# The kept proxies travel to studio/setup.ps1 (launched -NoProfile by unsloth_cli, and it
# downloads the VC++ runtime and the uv installer) as JSON in _UNSLOTH_PS_PROXY_DEFAULTS,
# since a PowerShell variable does not cross a process boundary. Credentials do not travel:
diff --git a/studio/setup.ps1 b/studio/setup.ps1
index 4a1ab6fa6ba..e69e9a76d73 100644
--- a/studio/setup.ps1
+++ b/studio/setup.ps1
@@ -20,6 +20,14 @@
#>
$ErrorActionPreference = "Stop"
+
+# This script is spawned as powershell.exe -- Windows PowerShell 5.1 (see the PSModulePath note
+# below) -- where the Invoke-WebRequest progress bar is redrawn on every read and sets the rate
+# instead of the link: the VC++ runtime (24.4 MB, Ensure-VCRedist) took 38.18s with the bar on
+# against 0.29s with it off on a windows-latest runner. -UseBasicParsing does not help; only this
+# preference does. Script scope, in a separate short-lived process, so nothing outlives it.
+$ProgressPreference = 'SilentlyContinue'
+
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$PackageDir = Split-Path -Parent $ScriptDir