remove AutocastLinear from SD3's MLP

This commit is contained in:
AUTOMATIC1111 2024-06-29 08:05:55 +03:00
parent 1394ecaf36
commit ebe8be9028

View File

@ -39,9 +39,9 @@ class Mlp(nn.Module):
out_features = out_features or in_features
hidden_features = hidden_features or in_features
self.fc1 = AutocastLinear(in_features, hidden_features, bias=bias, dtype=dtype, device=device)
self.fc1 = nn.Linear(in_features, hidden_features, bias=bias, dtype=dtype, device=device)
self.act = act_layer
self.fc2 = AutocastLinear(hidden_features, out_features, bias=bias, dtype=dtype, device=device)
self.fc2 = nn.Linear(hidden_features, out_features, bias=bias, dtype=dtype, device=device)
def forward(self, x):
x = self.fc1(x)