MCPcopy Create free account
hub / github.com/Francis-Rings/StableAnimator / forward

Function forward

animation/utils/geglu_patch.py:6–8  ·  view source on GitHub ↗
(self, hidden_states)

Source from the content-addressed store, hash-verified

4def patch_geglu_inplace():
5 """Patch GEGLU with inplace multiplication to save GPU memory."""
6 def forward(self, hidden_states):
7 hidden_states, gate = self.proj(hidden_states).chunk(2, dim=-1)
8 return hidden_states.mul_(self.gelu(gate))
9 diffusers.models.activations.GEGLU.forward = forward

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected