Pause the queue after the current clip for real, and carry global locks plus labeled permanence stills through generate and shot prompts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-28 07:48:09 -05:00
co-authored by Cursor
parent 010ef6add2
commit efef409537
21 changed files with 1196 additions and 115 deletions
+19 -4
View File
@@ -1,5 +1,6 @@
import { copyFileSync, existsSync, readFileSync } from 'node:fs'
import { join } from 'node:path'
import { composeShotPrompt } from '~/utils/globalLocks'
const SAMPLERS = new Set(['res_multistep', 'euler', 'dpmpp_2m'])
const SCHEDULERS = new Set(['simple', 'ddim_uniform', 'sgm_uniform'])
@@ -59,6 +60,12 @@ export default defineEventHandler(async (event) => {
const destFolder = publicLibrary(event).folders.find(folder => folder.id === source.folderId)
const folderLocked = Boolean(destFolder?.protected && !destFolder.unlocked)
const durationSeconds = parseExtendDuration(body?.duration)
const composedPrompt = composeShotPrompt({
globalLocks: source.globalLocks,
prompt,
shotIndex: (source.chainIndex || 0) + 1,
familyRefs: source.permanenceRefs
})
const turbo = source.turbo !== false
const fps = parseFps(source.fps)
const cfg = parseCfg(source.cfg, turbo)
@@ -84,7 +91,7 @@ export default defineEventHandler(async (event) => {
hideThumbnail: source.hideThumbnail,
folderLocked,
name: clipName,
prompt,
prompt: composedPrompt,
aspect: source.aspect || '16:9',
width,
height,
@@ -102,7 +109,9 @@ export default defineEventHandler(async (event) => {
familyId: source.familyId || crypto.randomUUID(),
parentClipId: source.id,
chainIndex: (source.chainIndex || 0) + 1,
workflow: parseVideoWorkflow(source.workflow)
workflow: parseVideoWorkflow(source.workflow),
globalLocks: source.globalLocks,
permanenceRefs: source.permanenceRefs
}
emitJob(job, { type: 'status', message: 'Extracting last frame & stitching extension...', progress: 2 })
@@ -111,7 +120,7 @@ export default defineEventHandler(async (event) => {
sourcePath,
part1Path,
framePath,
prompt,
prompt: composedPrompt,
width,
height,
steps,
@@ -236,7 +245,13 @@ async function runExtend(
extendPart1Path: job.library.extendPart1Path,
familyId: job.library.familyId,
parentClipId: job.library.parentClipId,
chainIndex: job.library.chainIndex
chainIndex: job.library.chainIndex,
stillId: job.library.stillId,
sound: job.library.sound,
workflow: job.library.workflow,
duration: job.library.duration,
globalLocks: job.library.globalLocks,
permanenceRefs: job.library.permanenceRefs
})
}
emitJob(job, { type: 'status', message: 'Job queued on ComfyUI', progress: 8 })