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.

studio: label RAM and VRAM readouts as GiB not GB (#6895)

Daniel Han46e2cf5deea0
diff --git a/studio/frontend/src/components/floating-monitor.tsx b/studio/frontend/src/components/floating-monitor.tsx
index f02da6612e4..bce4bf2831e 100644
--- a/studio/frontend/src/components/floating-monitor.tsx
+++ b/studio/frontend/src/components/floating-monitor.tsx
@@ -27,9 +27,11 @@ function usageTextClass(percent: number): string {
return "text-primary";
}
-function formatGb(value: number): string {
+function formatGiB(value: number): string {
+ // RAM/VRAM come from the backend in binary units (bytes / 1024**3), matching
+ // nvidia-smi and PyTorch, so label the readout GiB rather than GB.
const digits = value >= 10 ? 1 : 2;
- return `${value.toFixed(digits)} GB`;
+ return `${value.toFixed(digits)} GiB`;
}
export function FloatingMonitor() {
@@ -116,7 +118,7 @@ export function FloatingMonitor() {
</span>
</div>
<div className="text-xs text-muted-foreground font-mono tabular-nums">
- {formatGb(ramUsed)} / {formatGb(ramTotal)}
+ {formatGiB(ramUsed)} / {formatGiB(ramTotal)}
</div>
<Progress
value={ramPercent}
@@ -144,7 +146,7 @@ export function FloatingMonitor() {
</span>
</div>
<div className="text-xs text-muted-foreground font-mono tabular-nums">
- {formatGb(vramUsed)} / {formatGb(vramTotal)}
+ {formatGiB(vramUsed)} / {formatGiB(vramTotal)}
</div>
<Progress
value={vramPercent}
diff --git a/studio/frontend/src/features/hub/hub-page.tsx b/studio/frontend/src/features/hub/hub-page.tsx
index c3920e18f6c..3dfcad5b4c5 100644
--- a/studio/frontend/src/features/hub/hub-page.tsx
+++ b/studio/frontend/src/features/hub/hub-page.tsx
@@ -1085,11 +1085,11 @@ export function ModelsPage() {
const { vramInfo, minMemory } = useHubModelVram(selectedModel, gpu);
const gpuLabel = gpu.available
- ? `${Math.round(gpu.memoryTotalGb)} GB`
+ ? `${Math.round(gpu.memoryTotalGb)} GiB`
: "Unavailable";
const ramLabel =
gpu.systemRamTotalGb > 0
- ? `${Math.round(gpu.systemRamTotalGb)} GB`
+ ? `${Math.round(gpu.systemRamTotalGb)} GiB`
: "Unavailable";
const coreLabel =
gpu.cpuCore > 0 && gpu.cpuThread > 0
diff --git a/studio/frontend/src/features/onboarding/components/steps/summary-step.tsx b/studio/frontend/src/features/onboarding/components/steps/summary-step.tsx
index 6b6b11bf1f8..eb50d398b61 100644
--- a/studio/frontend/src/features/onboarding/components/steps/summary-step.tsx
+++ b/studio/frontend/src/features/onboarding/components/steps/summary-step.tsx
@@ -125,7 +125,7 @@ export function SummaryStep() {
<span className="text-xs text-muted-foreground">GPU</span>
<div className="flex items-center gap-2">
<span className="text-sm font-medium">{hw.gpuName ?? "---"}</span>
- <Badge variant="secondary">{hw.vramTotalGb != null ? `${hw.vramTotalGb} GB` : "---"}</Badge>
+ <Badge variant="secondary">{hw.vramTotalGb != null ? `${hw.vramTotalGb} GiB` : "---"}</Badge>
</div>
</div>
</div>
diff --git a/studio/frontend/src/features/settings/tabs/about-tab.tsx b/studio/frontend/src/features/settings/tabs/about-tab.tsx
index ff751e3cd61..1f323a9e8d8 100644
--- a/studio/frontend/src/features/settings/tabs/about-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/about-tab.tsx
@@ -158,7 +158,7 @@ export function AboutTab() {
<code className="font-mono text-xs text-muted-foreground">
{gpu.name ?? "—"}
{gpu.vramTotalGb != null
- ? ` · ${Math.round(gpu.vramTotalGb)} GB`
+ ? ` · ${Math.round(gpu.vramTotalGb)} GiB`
: ""}
</code>
</SettingsRow>
diff --git a/studio/frontend/src/features/settings/tabs/resources-tab.tsx b/studio/frontend/src/features/settings/tabs/resources-tab.tsx
index d5e19cc51cb..6c30858c631 100644
--- a/studio/frontend/src/features/settings/tabs/resources-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/resources-tab.tsx
@@ -47,6 +47,15 @@ function formatGb(value: number | null | undefined): string {
return `${safe.toFixed(digits)} GB`;
}
+// RAM/VRAM come from the backend in binary units (bytes / 1024**3), matching
+// nvidia-smi and PyTorch, so label those readouts GiB. Disk stays on formatGb
+// because the backend reports disk in decimal GB (bytes / 1e9).
+function formatGiB(value: number | null | undefined): string {
+ const safe = isFiniteNumber(value) ? Math.max(0, value) : 0;
+ const digits = safe >= 10 ? 1 : 2;
+ return `${safe.toFixed(digits)} GiB`;
+}
+
function formatMb(value: number | null | undefined): string {
const safe = isFiniteNumber(value) ? Math.max(0, value) : 0;
return `${Math.round(safe).toLocaleString()} MB`;
@@ -300,9 +309,9 @@ export function ResourcesTab() {
/>
<MetricTile
label={t("settings.resources.liveMonitor.ram")}
- value={`${formatGb(metrics.ramUsed)} / ${formatGb(metrics.ramTotal)}`}
+ value={`${formatGiB(metrics.ramUsed)} / ${formatGiB(metrics.ramTotal)}`}
detail={t("settings.resources.liveMonitor.free", {
- value: formatGb(systemInfo.memory?.available_gb),
+ value: formatGiB(systemInfo.memory?.available_gb),
})}
percent={systemInfo.memory?.percent_used ?? 0}
/>
@@ -318,13 +327,13 @@ export function ResourcesTab() {
label={t("settings.resources.liveMonitor.vram")}
value={
hasGpu
- ? `${formatGb(metrics.vramUsed)} / ${formatGb(metrics.vramTotal)}`
+ ? `${formatGiB(metrics.vramUsed)} / ${formatGiB(metrics.vramTotal)}`
: t("settings.resources.liveMonitor.noGpu")
}
detail={
hasGpu
? t("settings.resources.liveMonitor.free", {
- value: formatGb(metrics.vramFree),
+ value: formatGiB(metrics.vramFree),
})
: backendLabel
}
@@ -373,17 +382,17 @@ export function ResourcesTab() {
<div className="grid gap-1 text-xs text-muted-foreground sm:grid-cols-3 sm:gap-2">
<span className="min-w-0 truncate font-mono tabular-nums">
{t("settings.resources.gpu.used", {
- value: formatGb(used),
+ value: formatGiB(used),
})}
</span>
<span className="min-w-0 truncate font-mono tabular-nums sm:text-center">
{t("settings.resources.gpu.free", {
- value: formatGb(free),
+ value: formatGiB(free),
})}
</span>
<span className="min-w-0 truncate font-mono tabular-nums sm:text-right">
{t("settings.resources.gpu.total", {
- value: formatGb(total),
+ value: formatGiB(total),
})}
</span>
</div>
diff --git a/studio/frontend/src/features/studio/sections/progress-section.tsx b/studio/frontend/src/features/studio/sections/progress-section.tsx
index abab35db933..9c9398688f8 100644
--- a/studio/frontend/src/features/studio/sections/progress-section.tsx
+++ b/studio/frontend/src/features/studio/sections/progress-section.tsx
@@ -411,7 +411,7 @@ function LiveGpuPanel({
value={index}
className="bg-popover text-popover-foreground dark:bg-zinc-900 dark:text-zinc-100"
>
- GPU {device.visible_ordinal ?? index} - {device.backend} ({device.vram_total_gb ? `${Math.round(device.vram_total_gb)}GB` : "N/A"})
+ GPU {device.visible_ordinal ?? index} - {device.backend} ({device.vram_total_gb ? `${Math.round(device.vram_total_gb)}GiB` : "N/A"})
</option>
))}
</select>
@@ -446,7 +446,7 @@ function LiveGpuPanel({
icon={<HugeiconsIcon icon={RamMemoryIcon} className="size-3.5" />}
value={
currentGpu.vram_used_gb != null && currentGpu.vram_total_gb != null
- ? `${currentGpu.vram_used_gb} / ${currentGpu.vram_total_gb} GB`
+ ? `${currentGpu.vram_used_gb} / ${currentGpu.vram_total_gb} GiB`
: "--"
}
pct={currentGpu.vram_utilization_pct ?? 0}