Model camera beats and independent hero identity locks
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
export function nativeVideoGraph(template, request, files, prefix) {
|
||||
if (!files.hero) throw new Error('Identity still is required; never substitute the start frame.')
|
||||
const appearance = request.lockFace !== false || request.lockOutfit !== false
|
||||
if (appearance && !files.hero) throw new Error('Identity still is required; never substitute the start frame.')
|
||||
const g=structuredClone(template), s=request.settings
|
||||
g.hero.inputs.image=files.hero
|
||||
Object.assign(g['155'].inputs,{prompt:request.compiledPrompt,width:s.width,height:s.height,length:Math.ceil((s.duration*24-5)/17)*17+5,ref_image_size:'max'})
|
||||
g['155'].inputs['ref_images.ref_image_0']=['hero',0]
|
||||
if (appearance) { g.hero.inputs.image=files.hero; g['155'].inputs['ref_images.ref_image_0']=['hero',0] }
|
||||
else { delete g.hero; delete g['155'].inputs['ref_images.ref_image_0'] }
|
||||
Object.assign(g['155'].inputs,{prompt:request.compiledPrompt,width:s.width,height:s.height,length:Math.ceil((s.duration*(s.fps || 24)-5)/17)*17+5,ref_image_size:'max'})
|
||||
let conditioning=['155',0]
|
||||
for (const [name,image,frame] of [['start',files.start,0],['end',files.end,-1],...(files.guides||[]).map((f,i)=>[`guide${i}`,f.image,f.frame])]) {
|
||||
if (!image) continue
|
||||
@@ -13,6 +14,7 @@ export function nativeVideoGraph(template, request, files, prefix) {
|
||||
}
|
||||
g.guidance.inputs={conditioning,guidance:s.cfg}
|
||||
g['171'].inputs.noise_seed=s.seed
|
||||
g['172'].inputs.fps=s.fps || 24
|
||||
g['179'].inputs.value=s.steps;g['180'].inputs.value=s.steps;g['181'].inputs.value=s.turbo
|
||||
g['92'].inputs.filename_prefix=prefix+'/video'
|
||||
g.anchor_frame={class_type:'ImageFromBatch',inputs:{image:['164',0],batch_index:g['155'].inputs.length-1,length:1}}
|
||||
|
||||
Reference in New Issue
Block a user