Add support for video references in MiniMax H3 ref2va

This commit is contained in:
Jaret Burkett
2026-08-15 06:18:09 -06:00
parent 4900e5e866
commit 97bf49edad
10 changed files with 668 additions and 74 deletions

View File

@@ -238,6 +238,14 @@ class DataLoaderBatchDTO:
self.audio_tensor: Union[torch.Tensor, None] = None
self.first_frame_latents: Union[torch.Tensor, None] = None
self.audio_latents: Union[torch.Tensor, None] = None
# control-video reference paths (encoded + disk-cached lazily by
# models with supports_video_control_images)
self.control_video_paths_list: Union[List, None] = None
if any(getattr(x, 'control_video_paths', None) for x in self.file_items):
self.control_video_paths_list = [
list(getattr(x, 'control_video_paths', None) or [])
for x in self.file_items
]
# just for holding noise and preds during training
self.audio_target: Union[torch.Tensor, None] = None