1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

Use Tuple instead of tuple

Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
This commit is contained in:
David Bertoin
2025-10-21 09:18:04 +02:00
committed by DavidBert
parent 1354f450e6
commit aed1f19396

View File

@@ -340,7 +340,7 @@ class Modulation(nn.Module):
nn.init.constant_(self.lin.weight, 0)
nn.init.constant_(self.lin.bias, 0)
def forward(self, vec: Tensor) -> tuple[tuple[Tensor, Tensor, Tensor], tuple[Tensor, Tensor, Tensor]]:
def forward(self, vec: Tensor) -> Tuple[Tuple[Tensor, Tensor, Tensor], Tuple[Tensor, Tensor, Tensor]]:
out = self.lin(nn.functional.silu(vec))[:, None, :].chunk(6, dim=-1)
return tuple(out[:3]), tuple(out[3:])