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:
Towsty
2026-09-03 07:24:00 -05:00
co-authored by Cursor
parent 1206afe8fd
commit ce85e7f513
8 changed files with 88 additions and 33 deletions
+6 -4
View File
@@ -27,6 +27,7 @@ import {
type ImageV2Task
} from '~/utils/imageV2'
import { isXaigenStudio } from '~/utils/videoModels'
import { ingestPromptParts } from '~/utils/promptParts'
import { listStudioLoras, parsePostedLoraStack, persistLoraFields, assertImageV2LoraStack } from '~/server/utils/loras'
import { getStill, rememberInputStill, stillPath } from '~/server/utils/library'
import { existsSync, readFileSync } from 'node:fs'
@@ -136,10 +137,11 @@ export default defineEventHandler(async (event) => {
fields.task,
mode === 'generate' ? 't2i' : mode === 'refine' ? 'refine' : 'scene'
)
const promptMid = String(fields.prompt || '').trim()
const promptPre = String(fields.promptPre || '').trim()
const promptPost = String(fields.promptPost || '').trim()
const prompt = promptMid
const posted = ingestPromptParts(fields)
const promptMid = posted.promptMid
const promptPre = posted.promptPre
const promptPost = posted.promptPost
const prompt = posted.prompt
const extraPasses = parsePasses(fields.passes)
const passMode = parseImagePassMode(fields.passMode)
const aspect = parseImageAspect(fields.aspect)