From 6ea8fec89658f2a6945e6fac0820a577bb43e8a0 Mon Sep 17 00:00:00 2001 From: ghidras Date: Tue, 2 Jun 2026 13:32:53 +0200 Subject: [PATCH] Cookbook: fix Windows NVIDIA VRAM detection Co-authored-by: ghidras --- services/hwfit/hardware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/hwfit/hardware.py b/services/hwfit/hardware.py index ff545a1..2dec9b8 100644 --- a/services/hwfit/hardware.py +++ b/services/hwfit/hardware.py @@ -409,7 +409,7 @@ def _detect_windows(): " $gpus = @(); " " foreach ($line in $nv -split \"`n\") { " " $p = $line -split ','; " - " if ($p.Count -ge 2) { $gpus += @{name=$p[1].Trim(); vram_mb=[double]$p[0].Trim()} } " + " if ($p.Count -ge 2) { $gpus += [pscustomobject]@{name=$p[1].Trim(); vram_mb=[double]$p[0].Trim()} } " " }; " " $r.gpu_name = $gpus[0].name; " " $r.gpu_vram_gb = [math]::Round(($gpus | Measure-Object -Property vram_mb -Sum).Sum / 1024, 1); "