(self, image_embeds)
| 361 | torch.zeros(1, FIRST_LAST_FRAME_CONTEXT_TOKEN_NUMBER, 1280)) |
| 362 | |
| 363 | def forward(self, image_embeds): |
| 364 | if hasattr(self, 'emb_pos'): |
| 365 | bs, n, d = image_embeds.shape |
| 366 | image_embeds = image_embeds.view(-1, 2 * n, d) |
| 367 | image_embeds = image_embeds + self.emb_pos |
| 368 | clip_extra_context_tokens = self.proj(image_embeds) |
| 369 | return clip_extra_context_tokens |
| 370 | |
| 371 | |
| 372 | class WanModel(ModelMixin, ConfigMixin): |
nothing calls this directly
no outgoing calls
no test coverage detected