[Model] Skip unused frame packing in Wan2.2 S2V (#7155)
Signed-off-by: hyw <yuweih205@gmail.com>
This commit is contained in:
1 file changed
+3
-5
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
"""
|
||||
Wan2.2 Speech-to-Video (S2V) Transformer using vllm-omni ops.
|
||||
|
||||
@@ -1359,11 +1359,9 @@ class WanS2VTransformer3DModel(nn.Module):
|
||||
return flatten_mot, mot_remb
|
||||
|
||||
def process_motion_frame_pack(self, motion_latents, drop_motion_frames=False, add_last_motion=2):
|
||||
flatten_mot, mot_remb = self.frame_packer(motion_latents, add_last_motion)
|
||||
if drop_motion_frames:
|
||||
return [m[:, :0] for m in flatten_mot], [m[:, :0] for m in mot_remb]
|
||||
else:
|
||||
return flatten_mot, mot_remb
|
||||
return [], []
|
||||
return self.frame_packer(motion_latents, add_last_motion)
|
||||
|
||||
def process_motion_transformer_motioner(self, motion_latents, drop_motion_frames=False, add_last_motion=True):
|
||||
batch_size = motion_latents.shape[0]
|
||||
|
||||
Reference in new issue
Block a user