MCPcopy Create free account
hub / github.com/AlayaLab/Hive / __init__

Method __init__

models/flowsep/diffusers/models/embeddings.py:364–375  ·  view source on GitHub ↗
(
        self,
        text_embed_dim: int = 1024,
        image_embed_dim: int = 768,
        cross_attention_dim: int = 768,
        num_image_text_embeds: int = 10,
    )

Source from the content-addressed store, hash-verified

362
363class TextImageProjection(nn.Module):
364 def __init__(
365 self,
366 text_embed_dim: int = 1024,
367 image_embed_dim: int = 768,
368 cross_attention_dim: int = 768,
369 num_image_text_embeds: int = 10,
370 ):
371 super().__init__()
372
373 self.num_image_text_embeds = num_image_text_embeds
374 self.image_embeds = nn.Linear(image_embed_dim, self.num_image_text_embeds * cross_attention_dim)
375 self.text_proj = nn.Linear(text_embed_dim, cross_attention_dim)
376
377 def forward(self, text_embeds: torch.FloatTensor, image_embeds: torch.FloatTensor):
378 batch_size = text_embeds.shape[0]

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected