From 5df9e2d8acb50dec13eeca464fd07d5f64578bb7 Mon Sep 17 00:00:00 2001 From: Towsty Date: Thu, 3 Sep 2026 21:24:10 -0500 Subject: [PATCH] Add Force reset to clear stuck jobs and kill a wedged Comfy. Settings and the header menu can cancel invisible queue/pending work and force-stop Beast when Sleep is blocked. Co-authored-by: Cursor --- components/AppHeader.vue | 40 ++++++++++++++++++-- components/SettingsForm.vue | 46 +++++++++++++++++++++-- server/api/comfy/force-reset.post.ts | 15 ++++++++ server/utils/comfyLifecycle.ts | 55 +++++++++++++++++++++++----- server/utils/studioQueue.ts | 54 +++++++++++++++++++++++++++ 5 files changed, 194 insertions(+), 16 deletions(-) create mode 100644 server/api/comfy/force-reset.post.ts diff --git a/components/AppHeader.vue b/components/AppHeader.vue index 34b020c..ac373c9 100644 --- a/components/AppHeader.vue +++ b/components/AppHeader.vue @@ -75,11 +75,19 @@ type="button" class="block w-full rounded-xl px-3 py-2 text-left text-sm hover:bg-white/5 disabled:cursor-not-allowed disabled:opacity-50" :class="gpuSleeping ? 'text-amber-100' : 'text-zinc-200 hover:text-white'" - :disabled="gpuSleeping || gpuWaking || gpuBusy" + :disabled="gpuSleeping || gpuWaking || gpuForceResetting" :title="gpuError || (gpuBusy ? 'Cancel the running job first' : 'Stop Comfy on the GPU to free VRAM. Does not shut the PC down.')" role="menuitem" @click="sleepGpu" >{{ gpuSleeping ? 'Sleeping…' : 'Sleep' }} +
{{ gpuSleeping ? 'Stopping GPU…' : 'Sleep GPU' }} @@ -40,12 +40,24 @@ type="button" class="rounded-xl border px-3 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-60" :class="gpuWaking ? 'border-amber-300/40 text-amber-100' : 'border-amber-400/40 text-amber-200 hover:border-amber-300 hover:text-amber-50'" - :disabled="gpuWaking || gpuSleeping" + :disabled="gpuWaking || gpuSleeping || gpuForceResetting" @click="wakeGpu" > {{ gpuWaking ? 'Starting GPU…' : 'Wake GPU' }} +
+

+ Force reset: clears stuck/invisible queue jobs, interrupts Comfy, and kills it if Sleep is blocked. Does not shut the PC down. +

{{ gpuMessage }}