Add local queued video upscale with Real-ESRGAN and RIFE
This commit is contained in:
@@ -27,6 +27,7 @@ function fixture({ rows = [], lives = [], queue = { running: 0, pending: 0 }, hi
|
||||
const timers = []
|
||||
const started = []
|
||||
const modules = {
|
||||
'./videoUpscale': { startUpscaleJob: async item => { started.push({ upscale: true, sourceId: item.payload.upscale.sourceId }) } },
|
||||
'~/server/utils/sharedGpu': { withSharedGpuStart: async fn => fn(), maintainSharedGpu: async () => {}, acquireSharedGpu: async () => false, sharedGpuWaitReason: () => 'GPU is in use. Waiting for availability.' },
|
||||
'~/server/utils/jobs': {
|
||||
listJobs: () => lives,
|
||||
@@ -93,6 +94,20 @@ test('standalone YuEGP retains its queue slot while Comfy is empty for longer th
|
||||
assert.equal(f.started.length, 0)
|
||||
assert.equal(f.rows()[1].status, 'waiting')
|
||||
})
|
||||
test('standalone upscale retains its queue slot while Comfy is empty for longer than the zombie timeout', async () => {
|
||||
const live = liveJob('upscale-active', 'video', { upscale: true, promptId: undefined, startedAt: Date.now() - 3600000 })
|
||||
const f = fixture({ rows: [row('upscale-active'), row('next', 'waiting', undefined)], lives: [live] })
|
||||
await f.api.kickStudioQueue()
|
||||
assert.equal(live.status, 'running')
|
||||
assert.equal(f.started.length, 0)
|
||||
assert.equal(f.rows()[1].status, 'waiting')
|
||||
})
|
||||
test('upscale queue row dispatches to the standalone worker before any video generation path', async () => {
|
||||
const item = { ...row('upscale-waiting', 'waiting', undefined), kind: 'video', payload: { prompt: 'existing video', workflow: 'ltx-cherry', extensions: [], upscale: { sourceId: 'finished-master', scale: 2, fps: 'keep', target: 'preserve', enhance: 'faithful' } } }
|
||||
const f = fixture({ rows: [item], queue: null })
|
||||
await f.api.startStudioJob(item)
|
||||
assert.deepEqual(f.started, [{ upscale: true, sourceId: 'finished-master' }])
|
||||
})
|
||||
async function finishes(promise) {
|
||||
let timer
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user