Create standalone browser port of LTX Athena with authenticated native API transport
This commit is contained in:
commit
1333b0c36b
202 files changed
+63054
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import type { GenSpaceMode } from './genspace-multi-keyframe'
|
||||
import { toKeyframeInputs, type KeyframeItem } from './multi-keyframe.ts'
|
||||
|
||||
interface GenerateVideoImageInputs {
|
||||
imagePath?: string
|
||||
lastImagePath?: string
|
||||
keyframes?: Array<{
|
||||
imagePath: string
|
||||
frameIndex: number
|
||||
strength: number
|
||||
}>
|
||||
}
|
||||
|
||||
export function buildGenerateVideoImageInputs({
|
||||
mode,
|
||||
imagePath,
|
||||
lastImagePath,
|
||||
keyframes,
|
||||
}: {
|
||||
mode: GenSpaceMode
|
||||
imagePath: string | null | undefined
|
||||
lastImagePath: string | null | undefined
|
||||
keyframes: KeyframeItem[]
|
||||
}): GenerateVideoImageInputs {
|
||||
if (mode === 'multi-keyframe' && keyframes.length > 0) {
|
||||
return { keyframes: toKeyframeInputs(keyframes) }
|
||||
}
|
||||
|
||||
return {
|
||||
...(imagePath ? { imagePath } : {}),
|
||||
...(lastImagePath ? { lastImagePath } : {}),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user