Start I2V when Beast is idle instead of queuing behind leftover jobs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+17
-2
@@ -2008,6 +2008,7 @@ const studioJobs = ref<Array<{
|
||||
pendingCount?: number
|
||||
}>>([])
|
||||
const outputStudioJobId = ref('')
|
||||
const videoAwaitingBeast = ref(false)
|
||||
const pickerOpen = ref(false)
|
||||
const pickerKind = ref<'image' | 'permanence'>('image')
|
||||
const pickerSlot = ref<'main' | 'editRef' | number | 'perm' | `perm:${number}` | `clip:${string}`>('main')
|
||||
@@ -2133,11 +2134,15 @@ const liveStatusMessage = computed(() => {
|
||||
return idleInputStatus('edit')
|
||||
}
|
||||
if (videoBusy.value || videoUrl.value || lockedSave.value) return statusMessage.value
|
||||
if (outputQueuedJob.value) return statusMessage.value || 'Queued. Waiting for Beast to be free.'
|
||||
if (outputQueuedJob.value || videoAwaitingBeast.value) {
|
||||
return statusMessage.value || 'Queued. Waiting for Beast to be free.'
|
||||
}
|
||||
return idleInputStatus('video')
|
||||
})
|
||||
const liveStatusBusy = computed(() => (
|
||||
outputProgressKind.value === 'edit' ? editStatusBusy.value : statusBusy.value
|
||||
outputProgressKind.value === 'edit'
|
||||
? editStatusBusy.value
|
||||
: (statusBusy.value || videoAwaitingBeast.value)
|
||||
))
|
||||
const liveProgressPct = computed(() => (
|
||||
outputProgressKind.value === 'edit'
|
||||
@@ -3648,6 +3653,14 @@ async function refreshStudioQueue() {
|
||||
}>('/api/studio-queue').catch(() => ({ jobs: [] }))
|
||||
studioJobs.value = data.jobs || []
|
||||
const running = studioJobs.value.find(job => job.status === 'running' && job.liveJobId)
|
||||
const queuedMine = Boolean(
|
||||
outputStudioJobId.value
|
||||
&& studioJobs.value.some(job => job.id === outputStudioJobId.value && (job.status === 'waiting' || job.status === 'held'))
|
||||
)
|
||||
if (queuedMine && running && running.id !== outputStudioJobId.value) {
|
||||
return
|
||||
}
|
||||
if (running?.liveJobId) videoAwaitingBeast.value = false
|
||||
if (running?.kind === 'edit') {
|
||||
if (running.liveJobId && running.liveJobId !== editJobId.value && !editBusy.value) {
|
||||
outputStudioJobId.value = running.id
|
||||
@@ -4977,6 +4990,7 @@ async function generate() {
|
||||
if (started.queued) {
|
||||
outputStudioJobId.value = started.studioJobId || ''
|
||||
outputFocus.value = 'video'
|
||||
videoAwaitingBeast.value = true
|
||||
statusMessage.value = 'Queued. Waiting for Beast to be free.'
|
||||
const n = 1 + queued.length
|
||||
toast(n > 1
|
||||
@@ -4985,6 +4999,7 @@ async function generate() {
|
||||
await refreshStudioQueue()
|
||||
return
|
||||
}
|
||||
videoAwaitingBeast.value = false
|
||||
clearVideoForm()
|
||||
statusBusy.value = false
|
||||
videoBusy.value = true
|
||||
|
||||
Reference in New Issue
Block a user