From 3f0b65eea05299cfee4a0a122fa4d795480b3b81 Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Fri, 13 Dec 2024 07:54:34 +1100 Subject: [PATCH] Remove circular dependency Allows desktop change to be merged prior to frontend changes for this feature. --- src/main-process/comfyDesktopApp.ts | 8 +++++--- src/preload.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main-process/comfyDesktopApp.ts b/src/main-process/comfyDesktopApp.ts index cd35c7b4..7512d7c0 100644 --- a/src/main-process/comfyDesktopApp.ts +++ b/src/main-process/comfyDesktopApp.ts @@ -171,9 +171,11 @@ export class ComfyDesktopApp { store.set('basePath', installWizard.basePath); const { gpu } = installOptions; - store.set('selectedGpu', gpu); - if (gpu === 'cpu') store.set('devCpuMode', true); - else store.delete('devCpuMode'); + if (gpu !== undefined) { + store.set('selectedGpu', gpu); + if (gpu === 'cpu') store.set('devCpuMode', true); + else store.delete('devCpuMode'); + } await installWizard.install(); store.set('installState', 'installed'); diff --git a/src/preload.ts b/src/preload.ts index 624f13bf..9bcbc4ae 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -21,7 +21,7 @@ export interface InstallOptions { allowMetrics: boolean; migrationSourcePath?: string; migrationItemIds?: string[]; - gpu: GpuType; + gpu?: GpuType; } export interface SystemPaths {