update image encoder

This commit is contained in:
Artiprocher
2024-01-30 14:08:30 +08:00
parent e076e66827
commit 40d17569d3
2 changed files with 90 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ class CLIPEncoderLayer(torch.nn.Module):
def quickGELU(self, x):
return x * torch.sigmoid(1.702 * x)
def forward(self, hidden_states, attn_mask):
def forward(self, hidden_states, attn_mask=None):
residual = hidden_states
hidden_states = self.layer_norm1(hidden_states)