(self, videos)
| 1022 | ).eval().requires_grad_(False).to(device)) |
| 1023 | |
| 1024 | def encode(self, videos): |
| 1025 | try: |
| 1026 | if not isinstance(videos, list): |
| 1027 | raise TypeError("videos should be a list") |
| 1028 | with amp.autocast(dtype=self.dtype): |
| 1029 | return [ |
| 1030 | self.model.encode(u.unsqueeze(0), |
| 1031 | self.scale).float().squeeze(0) |
| 1032 | for u in videos |
| 1033 | ] |
| 1034 | except TypeError as e: |
| 1035 | logging.info(e) |
| 1036 | return None |
| 1037 | |
| 1038 | def decode(self, zs): |
| 1039 | try: |