Add generation quality controls and bind them to the MiniMax workflow.

Expose aspect, CFG, FPS, sampler, and scheduler in Generation settings, persist them on clips and held jobs, and inject those values into the Comfy graph. Keep the image picker stills-only and allow renaming library clips.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-25 22:55:06 -05:00
co-authored by Cursor
parent a7a810a7b3
commit dbe45fd2ff
9 changed files with 388 additions and 174 deletions
+5 -9
View File
@@ -4,7 +4,7 @@ const LONG_EDGE = 1344
export const ASPECT_PRESETS: Record<string, { width: number; height: number }> = {
'16:9': { width: 1344, height: 768 },
'9:16': { width: 768, height: 1344 },
'1:1': { width: 1024, height: 1024 }
'1:1': { width: 960, height: 960 }
}
export function snap32(value: number) {
@@ -85,16 +85,12 @@ function jpegSize(buf: Buffer) {
return null
}
export function resolveOutputSize(aspect: string | undefined, image: Buffer, fallbackWidth?: number, fallbackHeight?: number) {
export function resolveOutputSize(aspect: string | undefined, _image: Buffer, fallbackWidth?: number, fallbackHeight?: number) {
if (aspect && ASPECT_PRESETS[aspect]) {
return ASPECT_PRESETS[aspect]
}
const fromFields = Number(fallbackWidth) && Number(fallbackHeight)
? { width: snap32(Number(fallbackWidth)), height: snap32(Number(fallbackHeight)) }
: null
const size = imageDimensions(image)
if (size?.width && size?.height) {
return autoResolution(size.width, size.height)
if (Number(fallbackWidth) && Number(fallbackHeight)) {
return { width: snap32(Number(fallbackWidth)), height: snap32(Number(fallbackHeight)) }
}
return fromFields || ASPECT_PRESETS['16:9']
return ASPECT_PRESETS['16:9']
}