We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afe732b commit 8328a2dCopy full SHA for 8328a2d
comfy/ldm/hydit/poolers.py
@@ -16,6 +16,7 @@ def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, output_dim:
16
self.embed_dim = embed_dim
17
18
def forward(self, x):
19
+ x = x[:,:self.positional_embedding.shape[0] - 1]
20
x = x.permute(1, 0, 2) # NLC -> LNC
21
x = torch.cat([x.mean(dim=0, keepdim=True), x], dim=0) # (L+1)NC
22
x = x + self.positional_embedding[:, None, :].to(dtype=x.dtype, device=x.device) # (L+1)NC
0 commit comments