Join pre/prompt/post into the first MiniMax prompt, not only later shots.
The motion prompt field is what Comfy actually runs. Wrappers are now composed into that string on submit, and shot 1 falls back to it if the separate pre/post fields do not arrive. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,7 +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 { joinPromptParts } from '~/utils/promptParts'
|
||||
import { restorePromptParts, wrappedPromptForComfy } from '~/utils/promptParts'
|
||||
import { isXaigenStudio } from '~/utils/videoModels'
|
||||
import {
|
||||
imageV2StackSpecials,
|
||||
@@ -69,7 +69,14 @@ export async function runEditV2(job: Job, params: EditV2RunParams) {
|
||||
const extraPasses = canChain
|
||||
? (params.passes || []).map(item => ({ prompt: String(item.prompt || '').trim() })).filter(item => item.prompt)
|
||||
: []
|
||||
const prompts = [params.prompt, ...extraPasses.map(item => item.prompt)]
|
||||
const prompts = [
|
||||
library.promptMid || restorePromptParts(params.prompt, {
|
||||
pre: library.promptPre,
|
||||
prompt: params.prompt,
|
||||
post: library.promptPost
|
||||
}).prompt,
|
||||
...extraPasses.map(item => item.prompt)
|
||||
]
|
||||
const chainTotal = prompts.length
|
||||
const batch = params.passMode !== 'chain'
|
||||
const unit = batch ? 'Batch' : 'Pass'
|
||||
@@ -218,7 +225,7 @@ export async function runEditV2(job: Job, params: EditV2RunParams) {
|
||||
mode: params.mode,
|
||||
engine,
|
||||
task: params.task,
|
||||
prompt: joinPromptParts(library.promptPre, prompt, library.promptPost),
|
||||
prompt: wrappedPromptForComfy(library, prompt, index === 0 ? params.prompt : prompt),
|
||||
negative: params.negative,
|
||||
imageAName: uploaded?.name,
|
||||
imageBName: uploadedRef?.name,
|
||||
|
||||
Reference in New Issue
Block a user