Keep family pre/post text on shot queues and wrap the mid prompt at Comfy time.

Later shots were starting a new job without those wrappers, so only the first clip got them.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-03 07:17:00 -05:00
co-authored by Cursor
parent f05f8f3597
commit 1206afe8fd
9 changed files with 86 additions and 32 deletions
+8 -4
View File
@@ -63,6 +63,7 @@ export type QueuedInspectPayload = {
lyrics?: string
instrumental?: boolean
lyricsStrength?: number
musicEngine?: string
}
export type QueuedInspectJob = {
@@ -128,9 +129,11 @@ export function applyQueuedShots(kind: string, shots: QueuedShotDraft[], payload
}
next.prompt = shots[0]?.prompt || ''
next.duration = Number(shots[0]?.duration) || next.duration || 5
next.extensions = shots.slice(1).map((item) => {
const fields = persistLoraFields(item.loraStack || item.loraName)
next.extensions = shots.slice(1).map((item, index) => {
const prev = payload.extensions?.[index]
const fields = persistLoraFields(item.loraStack || item.loraName || prev?.loraStack || prev?.loraName)
return {
...prev,
prompt: item.prompt || '',
duration: Number(item.duration) || 5,
loraName: fields.loraName,
@@ -182,7 +185,7 @@ export function queuedJobCopyText(job: QueuedInspectJob) {
else lines.push(line('Lyrics', payload.lyrics))
} else {
if (payload.promptPre) lines.push(line('Prompt pre', payload.promptPre))
lines.push(line('Prompt', payload.prompt || job.prompt))
lines.push(line('Prompt', payload.promptMid || payload.prompt || job.prompt))
if (payload.promptPost) lines.push(line('Prompt post', payload.promptPost))
const shots = queuedJobShots(payload, job.kind)
if (shots.length > 1) {
@@ -220,7 +223,8 @@ export function queuedJobPresetBody(job: QueuedInspectJob, name: string) {
duration: clampMusicDuration(payload.duration),
steps: clampMusicSteps(payload.steps),
seed: payload.seed,
cfg: payload.cfg
cfg: payload.cfg,
engine: payload.musicEngine || payload.engine
}
}
}