25 lines
1.1 KiB
Text
25 lines
1.1 KiB
Text
use mod.flow.*
|
|
|
|
/** The shot to paint several ways, pick from, and animate. */
|
|
let prompt = Input{ type: @text default: "a paper airship crossing a sunrise cloud bank" }
|
|
/** One seed per candidate keyframe; the fleet spreads the jobs over its boxes. */
|
|
let seeds = Input{ type: @list default: [11, 23, 37, 41] }
|
|
/** The keyframe job, run once per seed by `candidates`. */
|
|
let image = Image{ prompt: prompt.text() width: 512 height: 512 }
|
|
let candidates = Map{ type: @image many: 8 body: image.image() over: seeds.list() bind: @seed concurrency: 4 }
|
|
let pick = Choose{ type: @image many: 8 from: candidates.items() question: "Which keyframe should move?" }
|
|
let video = Video{
|
|
prompt: prompt.text()
|
|
image: pick.image()
|
|
frames: 39
|
|
steps: 30
|
|
audio: true
|
|
}
|
|
/** Publish the animated keyframe into the flow asset library. */
|
|
let published = Publish{ value: video.video() namespace: "flows" tags: ["flow", "video"] }
|
|
|
|
Flow{
|
|
label: "Fleet images, choose, video"
|
|
brief: "Paints one keyframe per seed across the fleet, waits for you to pick one, and animates it."
|
|
prompt, seeds, image, candidates, pick, video, published
|
|
}
|