Split prompts into pre/prompt/post and tidy the AIGen video form.

Keep wrappers off the library mid-prompt so Use as input and Extend restore the same split, send stills to xAIGen as hidden inputs, and stop the two-column library from growing with the list.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-01 18:39:02 -05:00
co-authored by Cursor
parent ed04dcfee3
commit f788fd4bb4
22 changed files with 753 additions and 199 deletions
+4 -1
View File
@@ -8,6 +8,7 @@ import { imageDimensions } from '~/server/utils/resolution'
import { emitChainJob } from '~/server/utils/watch'
import { saveStill, stillChainName } from '~/server/utils/library'
import { comfyJobPrefix } from '~/utils/outputNames'
import { composePromptParts } from '~/utils/promptParts'
import { parseImageV2Engine, type ImageV2Engine, type ImageV2Mode, type ImageV2Task } from '~/utils/imageV2'
import type { EditImageFile } from '~/server/utils/imageChain'
@@ -194,7 +195,7 @@ export async function runEditV2(job: Job, params: EditV2RunParams) {
mode: params.mode,
engine,
task: params.task,
prompt,
prompt: composePromptParts(library.promptPre || '', prompt, library.promptPost || ''),
negative: params.negative,
imageAName: uploaded?.name,
imageBName: uploadedRef?.name,
@@ -264,6 +265,8 @@ export async function runEditV2(job: Job, params: EditV2RunParams) {
role: 'output',
name: passName || undefined,
prompt,
promptPre: library.promptPre,
promptPost: library.promptPost,
familyId: library.familyId,
parentStillId: batch ? (params.sourceStillId || library.stillId) : parentStillId,
chainIndex: index,