From b84be1662f2e04bdc4fd9fcd3d6b43d46c8eeac3 Mon Sep 17 00:00:00 2001 From: foreverpiano Date: Sat, 25 Jan 2025 12:02:09 +0000 Subject: [PATCH] upd --- fastvideo/models/hunyuan/modules/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fastvideo/models/hunyuan/modules/models.py b/fastvideo/models/hunyuan/modules/models.py index 93c06c0e7..d28866bd7 100644 --- a/fastvideo/models/hunyuan/modules/models.py +++ b/fastvideo/models/hunyuan/modules/models.py @@ -692,8 +692,9 @@ class HYVideoDiffusionTransformer(ModelMixin, ConfigMixin): self.x_end = img self.y_end = txt - if (EF >= block_id > SF) and counter%2 == 0 and counter < 25: - img = img + (self.x_end - self.x_init) + if EF == block_id and counter%2 == 0 and counter < 25: + img = img + self.x_end - self.x_init + txt = txt + self.y_end - self.y_init else: double_block_args = [img, txt, vec, freqs_cis, text_mask] img, txt = block(*double_block_args) @@ -713,7 +714,7 @@ class HYVideoDiffusionTransformer(ModelMixin, ConfigMixin): elif current_block_id == EB and counter%2 == 1: self.x_end_single = x - if (EB >= current_block_id > SB) and counter%2 == 0 and counter >= 25: + if EB == current_block_id and counter%2 == 0 and counter >= 25: x = x + (self.x_end_single - self.x_init_single) else: single_block_args = [x, vec, txt_seq_len, (freqs_cos, freqs_sin), text_mask]