diff --git a/api/workersRoute.ts b/api/workersRoute.ts index bf31c5a..9b7d0fa 100644 --- a/api/workersRoute.ts +++ b/api/workersRoute.ts @@ -55,6 +55,7 @@ async function getWorkerData(workerInstance: Model): Promise { + if (!response.data) { + throw new SdError("Failed to get worker sysinfo", response.response, response.error); + } + + // @ts-ignore there is no schema for /internal/sysinfo endpoint response + const nvidiaGPUModels = response.data["Torch env info"].nvidia_gpu_models ?? null; + + if (nvidiaGPUModels !== null) { + workerInstance.update({ gpu: nvidiaGPUModels }); + } + }); + // create worker const newWorker = generationQueue.createWorker(async ({ state }, updateJob) => { await processGenerationJob(state, updateJob, workerInstance.id); diff --git a/app/workerInstanceStore.ts b/app/workerInstanceStore.ts index 06325de..ea0c701 100644 --- a/app/workerInstanceStore.ts +++ b/app/workerInstanceStore.ts @@ -9,6 +9,7 @@ export const workerInstanceSchema = { key: { type: "string" }, // used for display name: { type: ["string", "null"] }, + gpu: { type: ["string", "null"] }, sdUrl: { type: "string" }, sdAuth: { type: ["object", "null"], diff --git a/ui/WorkersPage.tsx b/ui/WorkersPage.tsx index 0310cfe..e6cf60b 100644 --- a/ui/WorkersPage.tsx +++ b/ui/WorkersPage.tsx @@ -204,9 +204,12 @@ function WorkerListItem(props: { return (
  • -

    - {worker.name ?? worker.key} -

    +
    + + {worker.name ?? worker.key} + + {worker.gpu} +
    {worker.isActive ?

    ✅ Active

    : ( <>