diff --git a/examples/inference/basic/basic_self_forcing_causal_wan2_2_i2v.py b/examples/inference/basic/basic_self_forcing_causal_wan2_2_i2v.py index 669b2b691..5579ababe 100644 --- a/examples/inference/basic/basic_self_forcing_causal_wan2_2_i2v.py +++ b/examples/inference/basic/basic_self_forcing_causal_wan2_2_i2v.py @@ -26,7 +26,7 @@ def main(): ) sampling_param = SamplingParam.from_pretrained("FastVideo/SFWan2.2-I2V-A14B-Preview-Diffusers") - sampling_param.num_frames = 73 + sampling_param.num_frames = 81 sampling_param.width = 832 sampling_param.height = 480 sampling_param.seed = 1000 diff --git a/fastvideo/pipelines/stages/causal_denoising.py b/fastvideo/pipelines/stages/causal_denoising.py index f7b612ee9..777314547 100644 --- a/fastvideo/pipelines/stages/causal_denoising.py +++ b/fastvideo/pipelines/stages/causal_denoising.py @@ -400,6 +400,10 @@ class CausalDMDDenosingStage(DenoisingStage): start_index += current_num_frames + if boundary_timestep is not None: + num_frames_to_remove = self.num_frames_per_block - 1 + latents = latents[:, :, :-num_frames_to_remove, :, :] + batch.latents = latents return batch diff --git a/fastvideo/pipelines/stages/input_validation.py b/fastvideo/pipelines/stages/input_validation.py index 180ab4e71..20e4e949e 100644 --- a/fastvideo/pipelines/stages/input_validation.py +++ b/fastvideo/pipelines/stages/input_validation.py @@ -120,14 +120,14 @@ class InputValidationStage(PipelineStage): scale = max(ow / iw, oh / ih) img = img.resize((round(iw * scale), round(ih * scale)), Image.LANCZOS) - logger.info("resized img height: %s, img width: %s", img.height, - img.width) # center-crop x1 = (img.width - ow) // 2 y1 = (img.height - oh) // 2 img = img.crop((x1, y1, x1 + ow, y1 + oh)) assert img.width == ow and img.height == oh + logger.info("final processed img height: %s, img width: %s", img.height, + img.width) # to tensor img = TF.to_tensor(img).sub_(0.5).div_(0.5).to(