Added support for multiple input images

This commit is contained in:
DeepBeepMeep
2025-03-04 14:22:06 +01:00
parent c02c84961f
commit 24d8beb490
4 changed files with 89 additions and 46 deletions

View File

@@ -541,6 +541,6 @@ class CLIPModel:
videos = self.transforms.transforms[-1](videos.mul_(0.5).add_(0.5))
# forward
with torch.cuda.amp.autocast(dtype=self.dtype):
out = self.model.visual(videos, use_31_block=True)
with torch.amp.autocast(dtype=self.dtype, device_type="cuda"):
out = self.model.visual(videos.to(torch.bfloat16), use_31_block=True)
return out