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
@@ -4,6 +4,7 @@ import { assertImageScaleToTotalPixelsNode, comfyConfigured } from '~/server/uti
import { imageDimensions } from '~/server/utils/resolution'
import { parseImageAspect } from '~/utils/imageAspect'
import { clampImageCfg, clampImageScaleMegapixels, clampImageSteps, parseImagePassMode, parseImageScaleToTotalPixels } from '~/utils/generationPresets'
import { ingestPromptParts } from '~/utils/promptParts'
function parsePasses(raw: string | undefined) {
if (!raw) return [] as { prompt: string }[]
@@ -33,10 +34,11 @@ export default defineEventHandler(async (event) => {
}
}
const promptMid = (fields.prompt || '').trim()
const promptPre = (fields.promptPre || '').trim()
const promptPost = (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)