From 43cb25a038c68132564cbbbf9caf8ce9651bf392 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Fri, 31 Jan 2025 23:50:25 +0200 Subject: [PATCH] Update pipeline_hunyuan_video.py --- hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py b/hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py index 04ac34f..357fcd3 100644 --- a/hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py +++ b/hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py @@ -808,9 +808,13 @@ class HunyuanVideoPipeline(DiffusionPipeline): if progress_bar is not None: progress_bar.update() if callback is not None: + if leapfusion_img2vid: + callback_latent = (latent_model_input[:, :, 1:, :, :] - noise_pred[:, :, 1:, :, :] * t / 1000).detach()[0].permute(1,0,2,3) + else: + callback_latent = (latent_model_input - noise_pred * t / 1000).detach()[0].permute(1,0,2,3) callback( i, - (latent_model_input - noise_pred * t / 1000).detach()[0].permute(1,0,2,3), + callback_latent, None, num_inference_steps )