Skip to content

Commit 7ad634c

Browse files
committed
fix gpu sort code error
relates to #2
1 parent 10093d4 commit 7ad634c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebAPI/BasicAPIFeatures.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static async Task<JObject> InstallConfirmWS(Session session, WebSocket so
117117
int gpu = 0;
118118
if (nv is not null && nv.Length > 0)
119119
{
120-
NvidiaUtil.NvidiaInfo mostVRAM = nv.OrderByDescending(n => n.TotalMemory).First();
120+
NvidiaUtil.NvidiaInfo mostVRAM = nv.OrderByDescending(n => n.TotalMemory.InBytes).First();
121121
gpu = mostVRAM.ID;
122122
}
123123
await output("Enabling ComfyUI...");

0 commit comments

Comments
 (0)