MCPcopy Create free account
hub / github.com/apple/ml-stable-diffusion / forward

Method forward

python_coreml_stable_diffusion/unet.py:608–610  ·  view source on GitHub ↗
(self, hidden_states)

Source from the content-addressed store, hash-verified

606 self.proj = nn.Conv2d(dim_in, dim_out * 2, kernel_size=1)
607
608 def forward(self, hidden_states):
609 hidden_states, gate = self.proj(hidden_states).chunk(2, dim=1)
610 return hidden_states * F.gelu(gate)
611
612
613def get_activation(act_fn):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected