Skip to content

Commit

Permalink
add workflow for #111
Browse files Browse the repository at this point in the history
  • Loading branch information
jbilcke-hf committed Sep 11, 2024
1 parent c0ef9f4 commit 74b7509
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions packages/app/src/app/api/resolve/providers/replicate/runLipSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,30 @@ export async function runLipSync(
}

try {

// console.log(`requested model:`, request.settings.videoLipsyncWorkflow.data)
const response = (await replicate.run(
request.settings.videoLipsyncWorkflow.data as any,
{
input:
// TODO @julian: I'm not a fan of those hard-coded if/else
// we should read the params from the workflow parameters instead
request.settings.videoLipsyncWorkflow.id === 'replicate://douwantech/musetalk'
? {
video_input: segment.assetUrl,
audio_input: firstDialogueAudio,

disable_safety_checker:
!request.settings.censorNotForAllAudiencesContent,
} : {
// note: this is actually a VIDEO (they call it face, but it's a face video)
face: segment.assetUrl,
input_audio: firstDialogueAudio,

disable_safety_checker:
!request.settings.censorNotForAllAudiencesContent,
},
input:
// TODO @julian: I'm not a fan of those hard-coded if/else
// we should read the params from the workflow parameters instead
request.settings.videoLipsyncWorkflow.id ===
'replicate://douwantech/musetalk'
? {
video_input: segment.assetUrl,
audio_input: firstDialogueAudio,

disable_safety_checker:
!request.settings.censorNotForAllAudiencesContent,
}
: {
// note: this is actually a VIDEO (they call it face, but it's a face video)
face: segment.assetUrl,
input_audio: firstDialogueAudio,

disable_safety_checker:
!request.settings.censorNotForAllAudiencesContent,
},
}
)) as any

Expand Down

0 comments on commit 74b7509

Please sign in to comment.