| 307 | |
| 308 | |
| 309 | def forward(self, sample): |
| 310 | hidden_states = self.conv_in(sample) |
| 311 | |
| 312 | for block in self.blocks: |
| 313 | hidden_states = block(hidden_states, sample) |
| 314 | |
| 315 | hidden_states = self.norm_out(hidden_states) |
| 316 | hidden_states = self.conv_act(hidden_states) |
| 317 | hidden_states = self.conv_out(hidden_states)[:, :16] |
| 318 | hidden_states = hidden_states * self.scaling_factor |
| 319 | |
| 320 | return hidden_states |
| 321 | |
| 322 | |
| 323 | def encode_video(self, sample, tiled=True, tile_size=(60, 90), tile_stride=(30, 45), progress_bar=lambda x:x): |