Start ComfyUI automatically before queueing MiniMax jobs.
Health-check /system_stats, wait if the desktop is booting or busy, and start the host instance when it is fully offline. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+8
-2
@@ -169,7 +169,7 @@
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<div class="mb-2 flex items-center justify-between text-sm">
|
||||
<span class="text-zinc-300">{{ statusMessage }}</span>
|
||||
<span :class="statusBusy ? 'text-amber-200' : 'text-zinc-300'">{{ statusMessage }}</span>
|
||||
<span class="text-amber-200">{{ progress }}%</span>
|
||||
</div>
|
||||
<div class="h-2 overflow-hidden rounded-full bg-zinc-800">
|
||||
@@ -404,6 +404,7 @@ const showThumbnail = computed({
|
||||
const busy = ref(false)
|
||||
const progress = ref(0)
|
||||
const statusMessage = ref('Waiting for a still.')
|
||||
const statusBusy = ref(false)
|
||||
const step = ref(0)
|
||||
const maxStep = ref(8)
|
||||
const elapsedMs = ref(0)
|
||||
@@ -661,13 +662,14 @@ async function generate() {
|
||||
toast('Unlock the selected folder before generating.')
|
||||
return
|
||||
}
|
||||
statusBusy.value = false
|
||||
busy.value = true
|
||||
settledUi = false
|
||||
progress.value = 1
|
||||
videoUrl.value = ''
|
||||
awaitingReveal.value = false
|
||||
playerSize.value = outputSize.value
|
||||
statusMessage.value = 'Uploading image...'
|
||||
statusMessage.value = 'Checking ComfyUI...'
|
||||
startTimer()
|
||||
try {
|
||||
const body = new FormData()
|
||||
@@ -694,6 +696,7 @@ async function generate() {
|
||||
listen(started.jobId, started.hideThumbnail === true || hideThumbnail.value)
|
||||
} catch (error: any) {
|
||||
busy.value = false
|
||||
statusBusy.value = false
|
||||
stopTimer()
|
||||
const message = error?.data?.statusMessage || error?.statusMessage || error?.message || 'Failed to start generation'
|
||||
statusMessage.value = message
|
||||
@@ -712,6 +715,7 @@ function stopListen() {
|
||||
|
||||
function applyJobEvent(payload: Record<string, any>, hidden: boolean) {
|
||||
if (payload.message) statusMessage.value = payload.message
|
||||
statusBusy.value = payload.type === 'busy' || payload.busy === true
|
||||
if (typeof payload.progress === 'number') progress.value = payload.progress
|
||||
if (typeof payload.step === 'number') step.value = payload.step
|
||||
if (typeof payload.maxStep === 'number') maxStep.value = payload.maxStep
|
||||
@@ -728,6 +732,7 @@ function applyJobEvent(payload: Record<string, any>, hidden: boolean) {
|
||||
videoUrl.value = clipUrl
|
||||
awaitingReveal.value = Boolean(payload.hideThumbnail || hidden)
|
||||
busy.value = false
|
||||
statusBusy.value = false
|
||||
stopTimer()
|
||||
stopListen()
|
||||
loadLibrary().catch(() => null)
|
||||
@@ -737,6 +742,7 @@ function applyJobEvent(payload: Record<string, any>, hidden: boolean) {
|
||||
if (failed) {
|
||||
settledUi = true
|
||||
busy.value = false
|
||||
statusBusy.value = false
|
||||
stopTimer()
|
||||
stopListen()
|
||||
toast(payload.error || payload.message || 'Generation failed')
|
||||
|
||||
Reference in New Issue
Block a user