Choose generation mode automatically from starting image

This commit is contained in:
Towsty
2026-09-06 17:42:53 -05:00
parent 666c922f40
commit bb91b4fd3f
4 changed files with 60 additions and 59 deletions
+11
View File
@@ -0,0 +1,11 @@
import type { ImageV2Mode } from './imageV2'
export function imageModeForInput(mode: ImageV2Mode, hasImage: boolean, hasPasses = false): ImageV2Mode {
if (mode === 'compose' || mode === 'refine' || mode === 'iterate') return mode
if (!hasImage && hasPasses) return 'iterate'
return hasImage ? 'edit' : 'generate'
}
export function videoStartForInput(hasImage: boolean): 'still' | 'text' {
return hasImage ? 'still' : 'text'
}