MCPcopy Create free account
hub / github.com/CompVis/diff2flow / _forward

Method _forward

diff2flow/models/unet/attention.py:269–273  ·  view source on GitHub ↗
(self, x, context=None)

Source from the content-addressed store, hash-verified

267 return checkpoint(self._forward, (x, context), self.parameters(), self.checkpoint)
268
269 def _forward(self, x, context=None):
270 x = self.attn1(self.norm1(x), context=context if self.disable_self_attn else None) + x
271 x = self.attn2(self.norm2(x), context=context) + x
272 x = self.ff(self.norm3(x)) + x
273 return x
274
275
276class SpatialTransformer(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected