diff --git a/src/h3_blackwell_runtime/packing.py b/src/h3_blackwell_runtime/packing.py index e34f9b1..a92fe20 100644 --- a/src/h3_blackwell_runtime/packing.py +++ b/src/h3_blackwell_runtime/packing.py @@ -72,8 +72,8 @@ class H3PromptPacker: text_rows = text[0].to(torch.bfloat16) else: raise ValueError("H3 text states must be Qwen 5120-wide or refined 5376-wide.") - video_rows = functional.linear(patchify_video(video).float(), self.video_weight, self.video_bias).to(torch.bfloat16) - audio_rows = functional.linear(pack_audio(audio).float(), self.audio_weight, self.audio_bias).to(torch.bfloat16) + video_rows = functional.linear(patchify_video(video.to(torch.bfloat16)).float(), self.video_weight, self.video_bias).to(torch.bfloat16) + audio_rows = functional.linear(pack_audio(audio.to(torch.bfloat16)).float(), self.audio_weight, self.audio_bias).to(torch.bfloat16) text_length, audio_length = text_rows.shape[0], audio_rows.shape[0] hidden = torch.cat((text_rows, audio_rows, video_rows)) video_sigma = torch.tensor(float(sigma), device=hidden.device).clamp(min=1e-6)