MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / __init__

Method __init__

diffsynth/models/stepvideo_dit.py:586–601  ·  view source on GitHub ↗
(
        self, 
        dim: int,
        inner_dim: Optional[int] = None,
        dim_out: Optional[int] = None,
        mult: int = 4,
        bias: bool = False,
    )

Source from the content-addressed store, hash-verified

584
585class FeedForward(nn.Module):
586 def __init__(
587 self,
588 dim: int,
589 inner_dim: Optional[int] = None,
590 dim_out: Optional[int] = None,
591 mult: int = 4,
592 bias: bool = False,
593 ):
594 super().__init__()
595 inner_dim = dim*mult if inner_dim is None else inner_dim
596 dim_out = dim if dim_out is None else dim_out
597 self.net = nn.ModuleList([
598 GELU(dim, inner_dim, approximate="tanh", bias=bias),
599 nn.Identity(),
600 nn.Linear(inner_dim, dim_out, bias=bias)
601 ])
602
603
604 def forward(self, hidden_states: torch.Tensor, *args, **kwargs) -> torch.Tensor:

Callers

nothing calls this directly

Calls 2

GELUClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected